summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-02 14:08:18 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-02 14:08:18 +0200
commita487ef09981baa35cdc9c38e4b69270e88538dc6 (patch)
tree2e266ec45d17ad2664723c494909e8bf77b5625b
parent8d0414f3751ecba2d7dcffecadbfa6cd50d2daaf (diff)
improve layout of warning
-rw-r--r--src/LambdaCube/Compiler/Patterns.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/LambdaCube/Compiler/Patterns.hs b/src/LambdaCube/Compiler/Patterns.hs
index fe4ed352..a6b96d58 100644
--- a/src/LambdaCube/Compiler/Patterns.hs
+++ b/src/LambdaCube/Compiler/Patterns.hs
@@ -85,9 +85,10 @@ pattern PConSimp n ps = ParPat [PCon n ps]
85pattern ViewPatSimp e p = ParPat [ViewPat e p] 85pattern ViewPatSimp e p = ParPat [ViewPat e p]
86pattern PatTypeSimp p t = ParPat [PatType p t] 86pattern PatTypeSimp p t = ParPat [PatType p t]
87 87
88pBuiltin n ci ps = PConSimp (f n, left (second $ map $ first f) ci) ps 88pBuiltin_ n ci ps = PConSimp (n, left (second $ map $ first f) ci) ps
89 where 89 where
90 f n = SIName (debugSI $ "pattern_" ++ n) n 90 f n = SIName (debugSI $ "pattern_" ++ n) n
91pBuiltin n = pBuiltin_ (SIName (debugSI $ "Constructor_" ++ n) n)
91 92
92cTrue = pBuiltin "True" (Left ((CaseName "'Bool", 0), [("False", 0), ("True", 0)])) [] 93cTrue = pBuiltin "True" (Left ((CaseName "'Bool", 0), [("False", 0), ("True", 0)])) []
93cZero = pBuiltin "Zero" (Left ((CaseName "'Nat", 0), [("Zero", 0), ("Succ", 1)])) [] 94cZero = pBuiltin "Zero" (Left ((CaseName "'Nat", 0), [("Zero", 0), ("Succ", 1)])) []
@@ -96,7 +97,7 @@ cHNil = pBuiltin "HNil" (Left (("hlistNilCase", -1), [("HNil", 0)])) []
96cList a = pBuiltin "'List" (Right 1) [a] 97cList a = pBuiltin "'List" (Right 1) [a]
97cHList a = pBuiltin "'HList" (Right 1) [a] 98cHList a = pBuiltin "'HList" (Right 1) [a]
98cSucc a = pBuiltin "Succ" (Left ((CaseName "'Nat", 0), [("Zero", 0), ("Succ", 1)])) [a] 99cSucc a = pBuiltin "Succ" (Left ((CaseName "'Nat", 0), [("Zero", 0), ("Succ", 1)])) [a]
99cCons a b = pBuiltin "Cons" (Left ((CaseName "'List", 0), [("Nil", 0), ("Cons", 2)])) [a, b] 100cCons a b = pBuiltin_ (SIName_ mempty (Just $ InfixR 5) "Cons") (Left ((CaseName "'List", 0), [("Nil", 0), ("Cons", 2)])) [a, b]
100cHCons a b = pBuiltin "HCons" (Left (("hlistConsCase", -1), [("HCons", 2)])) [a, b] 101cHCons a b = pBuiltin "HCons" (Left (("hlistConsCase", -1), [("HCons", 2)])) [a, b]
101 102
102pattern PParens p = ViewPatSimp (SBuiltin "parens") p 103pattern PParens p = ViewPatSimp (SBuiltin "parens") p