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

Built-in Ports aren't TypeChecked #475

Closed
maxsnew opened this issue Jan 23, 2014 · 3 comments
Closed

Built-in Ports aren't TypeChecked #475

maxsnew opened this issue Jan 23, 2014 · 3 comments
Milestone

Comments

@maxsnew
Copy link
Contributor

maxsnew commented Jan 23, 2014

The built-in ports are not typechecked. This breaks stuff at runtime:

port stdout : Int
port stdout = 3

main = asText "sup"

crashes with TypeError: ports.stdout.subscribe is not a function since it tries to subscribe to something that's not a Signal.

@evancz
Copy link
Member

evancz commented Jan 23, 2014

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.

@maxsnew
Copy link
Contributor Author

maxsnew commented Jan 23, 2014

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"

@evancz
Copy link
Member

evancz commented Aug 6, 2015

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 elm-lang/elm-plans#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!

@evancz evancz closed this as completed Aug 6, 2015
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

2 participants