on master help sign in
Apply fromInteger for negative numbers
commitae3ad10fbf3d54d2abe0be7f3c6a08db90704c4a authorEdwin Brady <eb@cs.st-andrews.ac.uk> dateFri 18 Nov 2011, 10:52 (15 years ago) parent325b919
1 file changed+2−1
src/Idris/Parser.hs+2−1
src/Idris/Parser.hs+2−1
@@ -570,7 +570,8 @@ pStatic = do lchar '['; reserved "static"; lchar ']';
570570 <|> return Dynamic
571571
572572table fixes
573− = [[prefix "-" (\fc x -> PApp fc (PRef fc (UN ["-"])) [pexp (PConstant (I 0)), pexp x])]]
573+ = [[prefix "-" (\fc x -> PApp fc (PRef fc (UN ["-"]))
574+ [pexp (PApp fc (PRef fc (UN ["fromInteger"])) [pexp (PConstant (I 0))]), pexp x])]]
574575 ++ toTable (reverse fixes) ++
575576 [[binary "=" (\fc x y -> PEq fc x y) AssocLeft],
576577 [binary "->" (\fc x y -> PPi expl (MN 0 "X") x y) AssocRight]]