Closed maxsnew closed 9 years ago
Do you think there should be an ad-hoc check for the built-in ports? Is there a general way to address this problem? Anyone who writes a port handler may create this issue.
The idea I had was to treat built-in ports as a generalization of main
. I.e., if I write
port stdout : Int
I should get an error that says something like "stdout is a reserved port and is expected to have type Signal String
"
I am trying to clean up the issues on these repos. My goal is for issues on repos like elm-compiler
and elm-repl
are about specific bugs. It is not working to manage proposals and stuff that requires changes to the language here, so I am devising a way of keeping track of all this stuff in a transparent way.
The idea is that it doesn't super matter where the proposal is opened, but we should collect related ideas in certain places so we can look at them as a collection of issues and find a coherent solution that addresses them all as much as possible. So I'm gonna close this and reference https://github.com/elm-lang/elm-plans/issues/17 which is collecting a bunch of port problems.
If there is more to say about this idea, we should continue on this thread. The fact that is closed is more about decluttering stuff!
The built-in ports are not typechecked. This breaks stuff at runtime:
crashes with
TypeError: ports.stdout.subscribe is not a function
since it tries to subscribe to something that's not aSignal
.