diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-05-02 14:08:18 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-05-02 14:08:18 +0200 |
commit | a487ef09981baa35cdc9c38e4b69270e88538dc6 (patch) | |
tree | 2e266ec45d17ad2664723c494909e8bf77b5625b | |
parent | 8d0414f3751ecba2d7dcffecadbfa6cd50d2daaf (diff) |
improve layout of warning
-rw-r--r-- | src/LambdaCube/Compiler/Patterns.hs | 5 |
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] | |||
85 | pattern ViewPatSimp e p = ParPat [ViewPat e p] | 85 | pattern ViewPatSimp e p = ParPat [ViewPat e p] |
86 | pattern PatTypeSimp p t = ParPat [PatType p t] | 86 | pattern PatTypeSimp p t = ParPat [PatType p t] |
87 | 87 | ||
88 | pBuiltin n ci ps = PConSimp (f n, left (second $ map $ first f) ci) ps | 88 | pBuiltin_ 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 |
91 | pBuiltin n = pBuiltin_ (SIName (debugSI $ "Constructor_" ++ n) n) | ||
91 | 92 | ||
92 | cTrue = pBuiltin "True" (Left ((CaseName "'Bool", 0), [("False", 0), ("True", 0)])) [] | 93 | cTrue = pBuiltin "True" (Left ((CaseName "'Bool", 0), [("False", 0), ("True", 0)])) [] |
93 | cZero = pBuiltin "Zero" (Left ((CaseName "'Nat", 0), [("Zero", 0), ("Succ", 1)])) [] | 94 | cZero = pBuiltin "Zero" (Left ((CaseName "'Nat", 0), [("Zero", 0), ("Succ", 1)])) [] |
@@ -96,7 +97,7 @@ cHNil = pBuiltin "HNil" (Left (("hlistNilCase", -1), [("HNil", 0)])) [] | |||
96 | cList a = pBuiltin "'List" (Right 1) [a] | 97 | cList a = pBuiltin "'List" (Right 1) [a] |
97 | cHList a = pBuiltin "'HList" (Right 1) [a] | 98 | cHList a = pBuiltin "'HList" (Right 1) [a] |
98 | cSucc a = pBuiltin "Succ" (Left ((CaseName "'Nat", 0), [("Zero", 0), ("Succ", 1)])) [a] | 99 | cSucc a = pBuiltin "Succ" (Left ((CaseName "'Nat", 0), [("Zero", 0), ("Succ", 1)])) [a] |
99 | cCons a b = pBuiltin "Cons" (Left ((CaseName "'List", 0), [("Nil", 0), ("Cons", 2)])) [a, b] | 100 | cCons a b = pBuiltin_ (SIName_ mempty (Just $ InfixR 5) "Cons") (Left ((CaseName "'List", 0), [("Nil", 0), ("Cons", 2)])) [a, b] |
100 | cHCons a b = pBuiltin "HCons" (Left (("hlistConsCase", -1), [("HCons", 2)])) [a, b] | 101 | cHCons a b = pBuiltin "HCons" (Left (("hlistConsCase", -1), [("HCons", 2)])) [a, b] |
101 | 102 | ||
102 | pattern PParens p = ViewPatSimp (SBuiltin "parens") p | 103 | pattern PParens p = ViewPatSimp (SBuiltin "parens") p |