Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCannot use the unit type in ports #594
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
jvoigtlaender
May 11, 2016
Contributor
Known issue with (apparently) known fix. elm/compiler#1367, elm/compiler#1361
|
Known issue with (apparently) known fix. elm/compiler#1367, elm/compiler#1361 |
jvoigtlaender
closed this
May 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
toburger commentedMay 11, 2016
I'm trying to migrate the code from this blog post into elm 0.17: http://tech.noredink.com/post/126978281075/walkthrough-introducing-elm-to-a-js-web-app
I've got it to work here: https://github.com/toburger/elm-todomvc/tree/feature/elm17
However it is not possible to create a port using a unit type.
When trying to compile this code:
port dispatchDestroyCompleted : (() -> msg) -> Sub msgI get a runtime error saying: _Tuple0 is not defined
somehow unit gets transpiled into a tuple value.
When I change it to:
port dispatchDestroyCompleted : (List Int -> msg) -> Sub msgeverything works, but it doesn't resemble the intention of the port as clear as before.