This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- pulp dep install --save purescript-signal | |
import Prelude | |
import Signal as S | |
import Signal.Channel as C | |
let c = C.channel 0 | |
let s = C.subscribe c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PortTest where | |
import Debug exposing (log) | |
import Html exposing (div, text) | |
import Html.Attributes exposing (id) | |
import Html.Events exposing (onClick) | |
import Signal | |
import Task exposing (Task (..)) | |
outputSignal : Signal.Mailbox String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PortTest where | |
import Debug exposing (log) | |
import Html exposing (div, text) | |
import Html.Attributes exposing (id) | |
import Html.Events exposing (onClick) | |
import Signal | |
import Task exposing (Task (..)) | |
outputSignal : Signal.Mailbox String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PortTest where | |
{-- | |
<html> | |
<head> | |
<script src='port-test.js'></script> | |
</head> | |
<body> | |
<div id='port-test'></div> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PortTest where | |
{-- | |
<html> | |
<head> | |
<script src='port-test.js'></script> | |
</head> | |
<body> | |
<div id='port-test'></div> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PortTest2 where | |
import Debug | |
import Signal exposing (Mailbox, mailbox, Address) | |
import Effects exposing (Effects, none, Never) | |
import Basics exposing (toString) | |
import String | |
import Task | |
import Html exposing (Html, text, button, div) | |
import Html.Events exposing (onClick) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import DOM.Node.Types (ElementId(..)) | |
import Signal.Channel | |
import React |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module StartApp.StartApp ( start, Config, App ) where | |
{-| This module helps you start your application in a typical Elm workflow. | |
It assumes you are following [the Elm Architecture][arch] and using | |
[elm-effects][]. From there it will wire everything up for you! | |
**Be sure to [read the Elm Architecture tutorial][arch] to learn how this all | |
works!** | |
[arch]: https://github.com/evancz/elm-architecture-tutorial | |
[elm-effects]: http://package.elm-lang.org/packages/evancz/elm-effects/latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
purposeUpdate : (PU.Model -> (PU.Model, Effects PU.Action)) -> Model -> (Model, Effects Action) | |
purposeUpdate u m = | |
let finishPurposeUpdate p = | |
let (pm,e) = u p in | |
let newEffects = Effects.map Purpose e in | |
(PurposeModel pm, newEffects) | |
in | |
let updatePurpose y = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Effects exposing (Effects(..), Never) | |
import Html exposing (Html, div, button, text) | |
import Html.Attributes exposing (value) | |
import Html.Events exposing (onClick) | |
import Signal exposing (Mailbox) | |
import StartApp as SA | |
import Task exposing (Task(..)) | |
type Request = DummyRequest | Request String | |
type Response = Response String |
OlderNewer