You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a lot of confusing error messages from the parser when writing things like:
record Fun(f: (Int, Int) =>Bool)
// ^^// Expected ) but got =>deffoo { f: (Int, Int) =>Bool at {} } =<>// ^^^^// Expected an interface type.defbar(f: (Int, Int) =>Bool) =<>// ^^// Expected ) but got =>
They all stem from the fact that we distinguish between computation types and value types in the parser.
Instead, we should parse some generic, kind-less type and only resolve it properly some time later (ideally in Typer?)
My preferred error messages would be something like:
record Fun(f: (Int, Int) =>Bool)
// ~~~~~~~~~~~~~~~~~~//// Expected a value type, got a computation type.// Did you mean: `(Int, Int) => Bool at {}`?deffoo { f: (Int, Int) =>Bool at {} } =<>// ~~~~~~~~~~~~~~~~~~~~~~~//// Expected a computation type, got a value type.// Did you mean:// 1. `{ f: (Int, Int) => Bool }`?// 2. `(f: (Int, Int) => Bool at {})`?defbar(f: (Int, Int) =>Bool) =<>
The text was updated successfully, but these errors were encountered:
There are a lot of confusing error messages from the parser when writing things like:
They all stem from the fact that we distinguish between computation types and value types in the parser.
Instead, we should parse some generic, kind-less type and only resolve it properly some time later (ideally in Typer?)
My preferred error messages would be something like:
The text was updated successfully, but these errors were encountered: