stil4m/elm-syntax

ports in a non-port module is considered valid

Opened this issue · 1 comments

Currently, ports within a non-port module is considered valid, but that is an error in Elm.

module Main exposing (p)

port p : () -> Cmd msg

(Ellie: https://ellie-app.com/rMMpDDbbw4Qa1)

I wonder whether this should be considered kind of like a syntax error. I'd say so, but I'm not entirely sure.

I don't know if we should have similar checks for effect modules, I don't know them enough.

I also think this should be a syntax error.

And in the same way we should (?) report if a port module does not contain any ports.