on master help sign in
Prevent unquotations from being parsed as infix operators
29553b6David Raymond Christiansen
src/Idris/ParseHelpers.hs+1−1
@@ -326,7 +326,7 @@ commentMarkers :: [String]
326commentMarkers = [ "--", "|||" ]
326commentMarkers = [ "--", "|||" ]
327
327
328invalidOperators :: [String]
328invalidOperators :: [String]
329−invalidOperators = [":", "=>", "->", "<-", "=", "?=", "|", "**", "==>", "\\", "%"]
329+invalidOperators = [":", "=>", "->", "<-", "=", "?=", "|", "**", "==>", "\\", "%", "~", "?", "!"]
330
330
331-- | Parses an operator
331-- | Parses an operator
332operator :: MonadicParsing m => m String
332operator :: MonadicParsing m => m String
test/reg050/expected+5−12
@@ -1,15 +1,8 @@
1−badbangop.idr:16:1:When elaborating right hand side of opUse:
1+./badbangop.idr:7:1: error: ! is
2−When elaborating an application of function Prelude.Monad.>>=:
2+ not a valid
3− Can't unify
3+ operator, expected: space
4− List Integer
4+(!) : List a -> Nat -> Maybe a
5− with
5+^
6− argTy -> retTy
7−
8− Specifically:
9− Can't unify
10− List
11− with
12− \{uv0} => argTy -> uv
13./baddoublebang.idr:6:28: error: unexpected
6./baddoublebang.idr:6:28: error: unexpected
14 Operator without known fixity:
7 Operator without known fixity:
15 !!, expected: space
8 !!, expected: space