summaryrefslogtreecommitdiff
path: root/src/LambdaCube/Compiler/Patterns.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/LambdaCube/Compiler/Patterns.hs')
-rw-r--r--src/LambdaCube/Compiler/Patterns.hs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/LambdaCube/Compiler/Patterns.hs b/src/LambdaCube/Compiler/Patterns.hs
index 9a986fd6..a2bc3831 100644
--- a/src/LambdaCube/Compiler/Patterns.hs
+++ b/src/LambdaCube/Compiler/Patterns.hs
@@ -42,13 +42,11 @@ data Pat_ c
42 | PCon_ SI (SIName, c) [ParPat_ c] 42 | PCon_ SI (SIName, c) [ParPat_ c]
43 | ViewPat_ SI SExp (ParPat_ c) 43 | ViewPat_ SI SExp (ParPat_ c)
44 | PatType_ SI (ParPat_ c) SExp 44 | PatType_ SI (ParPat_ c) SExp
45 deriving Show
46 45
47type ParPat = ParPat_ ConsInfo 46type ParPat = ParPat_ ConsInfo
48 47
49-- parallel patterns like v@(f -> [])@(Just x) 48-- parallel patterns like v@(f -> [])@(Just x)
50data ParPat_ c = ParPat_ SI [Pat_ c] 49data ParPat_ c = ParPat_ SI [Pat_ c]
51 deriving Show
52 50
53pattern ParPat ps <- ParPat_ _ ps 51pattern ParPat ps <- ParPat_ _ ps
54 where ParPat ps = ParPat_ (foldMap sourceInfo ps) ps 52 where ParPat ps = ParPat_ (foldMap sourceInfo ps) ps
@@ -198,7 +196,6 @@ data Lets a
198 = LLet SIName SExp (Lets a) 196 = LLet SIName SExp (Lets a)
199 | LTypeAnn SExp (Lets a) -- TODO: eliminate if not used 197 | LTypeAnn SExp (Lets a) -- TODO: eliminate if not used
200 | In a 198 | In a
201 deriving Show
202 199
203lLet sn (SVar sn' i) l = rSubst 0 i l 200lLet sn (SVar sn' i) l = rSubst 0 i l
204lLet sn e l = LLet sn e l 201lLet sn e l = LLet sn e l
@@ -223,7 +220,6 @@ data GuardTree
223 = GuardNode SExp (SIName, ConsInfo) [SIName] GuardTrees GuardTrees 220 = GuardNode SExp (SIName, ConsInfo) [SIName] GuardTrees GuardTrees
224 | GTSuccess SExp 221 | GTSuccess SExp
225 | GTFailure 222 | GTFailure
226 deriving Show
227 223
228instance DeBruijnify SIName GuardTree where 224instance DeBruijnify SIName GuardTree where
229 deBruijnify_ l ns = mapGT (`deBruijnify_` ns) (`deBruijnify_` ns) l 225 deBruijnify_ l ns = mapGT (`deBruijnify_` ns) (`deBruijnify_` ns) l