on master help sign in
Added backtick notation: e.g. x xs
022e230Edwin Brady
CHANGELOG+2
@@ -3,12 +3,14 @@ New in 0.9.2:
3
3
4User visible changes:
4User visible changes:
5
5
6+* backtick notation added: x `foo` y ==> foo x y
6* case expressions allowed in type signatures
7* case expressions allowed in type signatures
7* Library extensions in prelude.vect and prelude.algebra
8* Library extensions in prelude.vect and prelude.algebra
8
9
9Internal changes:
10Internal changes:
10
11
11* Some type class resolution fixes
12* Some type class resolution fixes
13+* Several minor bug fixes
12
14
13New in 0.9.1:
15New in 0.9.1:
14-------------
16-------------
src/Idris/Parser.hs+9−5
@@ -941,7 +941,8 @@ table fixes
941 = [[prefix "-" (\fc x -> PApp fc (PRef fc (UN "-"))
941 = [[prefix "-" (\fc x -> PApp fc (PRef fc (UN "-"))
942 [pexp (PApp fc (PRef fc (UN "fromInteger")) [pexp (PConstant (I 0))]), pexp x])]]
942 [pexp (PApp fc (PRef fc (UN "fromInteger")) [pexp (PConstant (I 0))]), pexp x])]]
943 ++ toTable (reverse fixes) ++
943 ++ toTable (reverse fixes) ++
944+ [[backtick],
944− [[binary "=" (\fc x y -> PEq fc x y) AssocLeft],
945+ [binary "=" (\fc x y -> PEq fc x y) AssocLeft],
945 [binary "->" (\fc x y -> PPi expl (MN 42 "__pi_arg") x y) AssocRight]]
946 [binary "->" (\fc x y -> PPi expl (MN 42 "__pi_arg") x y) AssocRight]]
946
947
947toTable fs = map (map toBin)
948toTable fs = map (map toBin)
@@ -954,10 +955,13 @@ toTable fs = map (map toBin)
954 assoc (Infixr _) = AssocRight
955 assoc (Infixr _) = AssocRight
955 assoc (InfixN _) = AssocNone
956 assoc (InfixN _) = AssocNone
956
957
957−binary name f assoc = Infix (do { reservedOp name; fc <- pfc;
958+binary name f assoc = Infix (do reservedOp name; fc <- pfc;
958− return (f fc) }) assoc
959+ return (f fc)) assoc
959−prefix name f = Prefix (do { reservedOp name; fc <- pfc;
960+prefix name f = Prefix (do reservedOp name; fc <- pfc;
960− return (f fc) })
961+ return (f fc))
962+backtick = Infix (do lchar '`'; n <- pfName; lchar '`'
963+ fc <- pfc
964+ return (\x y -> PApp fc (PRef fc n) [pexp x, pexp y])) AssocNone
961
965
962--------- Data declarations ---------
966--------- Data declarations ---------
963
967