This file contains hidden or 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 Html exposing (text) | |
| main = | |
| text (toString output) | |
| output = | |
| apply app | |
This file contains hidden or 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 Control.Monad.State | |
| foo :: State Int String | |
| foo = do | |
| count <- get | |
| put $ count + 1 | |
| return "Hello" |
This file contains hidden or 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
| -- MODEL ---------- | |
| type alias Id = String | |
| -- Son | |
| type alias Son = | |
| { id : Id |
This file contains hidden or 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
| type alias Position | |
| = (Align, Align) | |
| type alias Size | |
| = Int | |
| type alias Length | |
| = Int | |
| type alias Align |
This file contains hidden or 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
| -- this is serializable | |
| type alias Input = (String, Json.Decode.Value) | |
| -- this may be not serializable | |
| type Msg = ... | |
| -- Transform Input to Msg. | |
| inputToMsg : Input -> Msg | |
| inputToMsg (tipe, json) = | |
| if tipe == ... |
This file contains hidden or 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 exposing (..) | |
| import Html exposing (..) | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (..) | |
| import Html.App exposing (..) | |
| import Array exposing (Array) | |
This file contains hidden or 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 Html exposing (..) | |
| import Html.App exposing (beginnerProgram) | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (..) | |
| import Json.Decode as Decode exposing (..) | |
| main = | |
| beginnerProgram { model = "", view = view, update = update } |
This file contains hidden or 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 Html exposing (..) | |
| import Html.App as Html | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (on) | |
| import Json.Decode as Json exposing ((:=)) | |
| import Mouse exposing (Position) | |
| main = | |
| Html.program <| debugOn | |
| { init = init |
This file contains hidden or 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 Html exposing (Attribute, div, button, text) | |
| import Html.App exposing (beginnerProgram) | |
| import Html.Attributes exposing (style) | |
| import Html.Events exposing (onClick, onMouseEnter, onMouseLeave) | |
| import Set exposing (Set) | |
| main = | |
| beginnerProgram { model = { count = 0, hover = hoverInit }, view = view, update = update } |
This file contains hidden or 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 Html exposing (Html, text, button, div, p, ul, li) | |
| import Html.Attributes exposing (style) | |
| import Html.Events exposing (onClick) | |
| type OuterMsg = | |
| ContainerMsg InnerMsg | View1Click | View2Click | |
| main : Html OuterMsg |