Created
September 25, 2016 20:38
-
-
Save abailly/1633f7478cf5b28d733f325afc035428 to your computer and use it in GitHub Desktop.
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 Gorilla.Test exposing(..) | |
| import Navigation | |
| type Array a = Array | |
| type Project = Project | |
| type Entity = Entity | |
| type alias Time = Int | |
| type alias Route = String | |
| update : Msg -> Model -> (Model, Cmd Msg) | |
| update msg model = | |
| case msg of | |
| Anim -> | |
| (model, Navigation.newUrl "") | |
| Anima a -> | |
| let | |
| tmp = updateA a model.content | |
| in | |
| (Model (Left (fst tmp)) model.route, (snd tmp)) | |
| Port -> | |
| (model, Navigation.newUrl "#portfolio") | |
| Tech -> | |
| (model, Navigation.newUrl "#technical") | |
| _ -> | |
| (model, Cmd.none) | |
| updateA : A -> Modo -> (Modo, Cmd Msg) | |
| updateA _ m = (m, Cmd.none) | |
| type alias Model = | |
| { content: Hotswap Modo (Array Project) (Array String) String | |
| , route: Route | |
| } | |
| type Msg = | |
| NoOp | |
| | Anim | |
| | Anima A | |
| | Port | |
| | Tech | |
| type A = | |
| GenPoint | |
| | Add (Float,Float) | |
| | Tick Time | |
| | Bick Time | |
| type alias Modo = | |
| { | |
| index: Int | |
| , curr: Time | |
| , points: Array Entity | |
| } | |
| type Hotswap a b c d = | |
| Left a | Middle b | Right c | Empty d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment