Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to use union type as message #13

Open
layflags opened this issue Apr 28, 2019 · 0 comments
Open

Error when trying to use union type as message #13

layflags opened this issue Apr 28, 2019 · 0 comments

Comments

@layflags
Copy link
Owner

I think it has to do with msg being the unit type.

type alias Model_ =
    { array : Array Int
    }


type Msg_
    = Blah


main : Program () Model_ Msg_
main =
    Monitor.sandbox
        { init = { array = Array.fromList [ 5 ] }
        , view = \_ -> Html.button [ Html.Events.onClick Blah ] [ Html.text "produces an error in console" ]
        , update = \_ model -> model
        }

This code works fine, but if I replace Msg_ with () then I get the n is null exception.

Originally posted by @MartinSStewart in #9 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant