on master help sign in
Prevent unquotations from being parsed as infix operators
commit29553b639aa0d2c675612b0c8a957c144b27f955 authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateThu 5 Mar 2015, 15:33 (12 years ago) parent2e93a50
2 files changed+6−13
src/Idris/ParseHelpers.hs+1−1 test/reg050/expected+5−12
src/Idris/ParseHelpers.hs+1−1
@@ -326,7 +326,7 @@ commentMarkers :: [String]
326326commentMarkers = [ "--", "|||" ]
327327
328328invalidOperators :: [String]
329−invalidOperators = [":", "=>", "->", "<-", "=", "?=", "|", "**", "==>", "\\", "%"]
329+invalidOperators = [":", "=>", "->", "<-", "=", "?=", "|", "**", "==>", "\\", "%", "~", "?", "!"]
330330
331331-- | Parses an operator
332332operator :: 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:
2−When elaborating an application of function Prelude.Monad.>>=:
3− Can't unify
4− List Integer
5− with
6− argTy -> retTy
7−
8− Specifically:
9− Can't unify
10− List
11− with
12− \{uv0} => argTy -> uv
1+./badbangop.idr:7:1: error: ! is
2+ not a valid
3+ operator, expected: space
4+(!) : List a -> Nat -> Maybe a
5+^
136./baddoublebang.idr:6:28: error: unexpected
147 Operator without known fixity:
158 !!, expected: space