Open kasrasadeghi opened 6 years ago
@kasrasadeghi I agree that the error message is unhelpful, however there is one syntax error in your example that is confusing the parser, and the root of the error: In Idris, case splits, and anonymous functions, use the fat arrow: =>
instead of ->
.
The parser has yet to report the use of :
for cons ::
as it's errored on the case split body.
Here, the parser is interpreting the body of the case split i.e. the splits, as a type signature. It would be better for the parser to state that the wrong arrows are being used, but OTOH, it's backtracked sufficiently to state the problem is with the let expression.
Please attach complete source files that exhibit the issue in addition to quoting from them here.
Steps to Reproduce
Main.idr:
Expected Behavior
A better error message, stating the use of ':' as cons instead of '::'.
Observed Behavior