Created
October 2, 2016 12:57
-
-
Save joonazan/ad6c96b9626560e57ae9647688b834d1 to your computer and use it in GitHub Desktop.
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 Child exposing (init, update, Message) | |
init = 0 | |
type Message | |
= InterestingMessage | |
| InternalMessage | |
update message model = model |
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 Html | |
import Html.App | |
import Child | |
main = Html.App.beginnerProgram | |
{ update = update | |
, model = Child.init | |
, view = \model -> Html.text "hello" | |
} | |
type Message | |
= MyMessage | |
| ChildMessage Child.Message | |
type IMSG = Child.InterestingMessage | |
update message model = | |
case message of | |
MyMessage -> model | |
--ChildMessage IMSG -> model | |
ChildMessage x -> Child.update x model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment