elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.53k stars 663 forks source link

Used toErrorType on a type that is not well-formed #2083

Open alexandru-calinoiu opened 4 years ago

alexandru-calinoiu commented 4 years ago

Quick Summary:

I tried the some code in the repl and go the following exception

elm: Used toErrorType on a type that is not well-formed
CallStack (from HasCallStack):
  error, called at compiler/src/Type/Type.hs:541:21 in main:Type.Type

SSCCE

Type the following code in your repl

> type alias Article a = { a | title : String, tags : List String }
> type Preview = Article { id : Int } 
> id : Article Preview -> Int
| id p =
|   p.id
|  

Additional Details

None

github-actions[bot] commented 4 years ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.