on master help sign in
Add message on = and : for when you indented a definition wrong
094830dEvan Czaplicki
src/Parse/Binop.hs+2−2
@@ -45,10 +45,10 @@ failOn op msg =
45notReserved :: IParser a
45notReserved :: IParser a
46notReserved =
46notReserved =
47 choice
47 choice
48− [ failOn "=" "The = operator is reserved for defining variables. Maybe you want == instead?"
48+ [ failOn "=" "The = operator is reserved for defining variables. Maybe you want == instead? Or maybe you are defining a variable, but there is whitespace before it?"
49 , failOn "->" "Arrows are reserved for cases and anonymous functions. Maybe you want > or >= instead?"
49 , failOn "->" "Arrows are reserved for cases and anonymous functions. Maybe you want > or >= instead?"
50 , failOn "|" "Vertical bars are reserved for use in union type declarations. Maybe you want || instead?"
50 , failOn "|" "Vertical bars are reserved for use in union type declarations. Maybe you want || instead?"
51− , failOn ":" "A singe colon is for type annotations. Maybe you want :: instead?"
51+ , failOn ":" "A singe colon is for type annotations. Maybe you want :: instead? Or maybe you are defining a type annotation, but there is whitespace before it?"
52 ]
52 ]
53
53
54
54