elm-lang / elm-make

A build tool for Elm projects
BSD 3-Clause "New" or "Revised" License
175 stars 45 forks source link

compilation error does not seem complete #75

Closed burnt43 closed 8 years ago

burnt43 commented 8 years ago

I have a small program where I mess up a recursive data structure as show below.

type LList t = Empty t | Node t LList t
foo : LList Int
foo = 
  Node 5 Empty

When attempting to compile it will fail with the following message

elm make repro.elm --output=repro.js
-- TYPE MISMATCH ----------------------------------------------------- repro.elm

The type annotation for `foo` does not match its definition.

2│ foo : LList Int
         ^^^^^^^^^
The type annotation is saying:

    elm-make: type applications should start with a type atom

The elm-make is in yellow like "\033[0;33m" and is never set back to the default color so my terminal remains yellow until I clear it manually by printing out "\033[0;39m", so I'm not sure if this is a full message or if there is supposed to be more to it

jvoigtlaender commented 8 years ago

This is definitely a bug. But maybe it belongs in the https://github.com/elm-lang/elm-compiler repo. @evancz?

evancz commented 8 years ago

Yeah, this is a compiler bug, let's move it over there.

Can you open the same issue there, but with the title "error when printing out types with kind errors" and add a note that the "solution" may be just to resolve the root issue https://github.com/elm-lang/elm-compiler/issues/1146