@@ -51,6 +51,7 @@ instance TokenParsing IdrisParser where
51 someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
51 someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
52 token p = do s <- get
52 token p = do s <- get
53 (FC fn (sl, sc) _) <- getFC --TODO: Update after fixing getFC
53 (FC fn (sl, sc) _) <- getFC --TODO: Update after fixing getFC
55 (FC fn _ (el, ec)) <- getFC
56 (FC fn _ (el, ec)) <- getFC
56 whiteSpace
57 whiteSpace
@@ -316,7 +317,7 @@ operatorLetter = oneOf opChars
316-- | Parses an operator
317-- | Parses an operator
317operator :: MonadicParsing m => m String
318operator :: MonadicParsing m => m String
318operator = do op <- token . some $ operatorLetter
319operator = do op <- token . some $ operatorLetter
319− when (op `elem` [":", "=>", "->", "<-", "=", "?=", "|"]) $
320+ when (op `elem` [":", "=>", "->", "<-", "=", "?=", "|"]) $
320 fail $ op ++ " is not a valid operator"
321 fail $ op ++ " is not a valid operator"
321 return op
322 return op
@@ -343,6 +344,8 @@ getFC = do s <- position
343 let (dir, file) = splitFileName (fileName s)
344 let (dir, file) = splitFileName (fileName s)
344 let f = if dir == addTrailingPathSeparator "." then file else fileName s
345 let f = if dir == addTrailingPathSeparator "." then file else fileName s
345 return $ FC f (lineNum s, columnNum s) (lineNum s, columnNum s) -- TODO: Change to actual spanning
346 return $ FC f (lineNum s, columnNum s) (lineNum s, columnNum s) -- TODO: Change to actual spanning
347+ -- Issue #1594 on the Issue Tracker.
348+ -- https://github.com/idris-lang/Idris-dev/issues/1594
347{-* Syntax helpers-}
350{-* Syntax helpers-}
348-- | Bind constraints to term
351-- | Bind constraints to term
@@ -574,4 +577,3 @@ collect (PInstance f s cs n ps t en ds : ds')
574 = PInstance f s cs n ps t en (collect ds) : collect ds'
577 = PInstance f s cs n ps t en (collect ds) : collect ds'
575collect (d : ds) = d : collect ds
578collect (d : ds) = d : collect ds
576collect [] = []
579collect [] = []