diff options
Diffstat (limited to 'src/LambdaCube/Compiler/Patterns.hs')
-rw-r--r-- | src/LambdaCube/Compiler/Patterns.hs | 4 |
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 | ||
47 | type ParPat = ParPat_ ConsInfo | 46 | type ParPat = ParPat_ ConsInfo |
48 | 47 | ||
49 | -- parallel patterns like v@(f -> [])@(Just x) | 48 | -- parallel patterns like v@(f -> [])@(Just x) |
50 | data ParPat_ c = ParPat_ SI [Pat_ c] | 49 | data ParPat_ c = ParPat_ SI [Pat_ c] |
51 | deriving Show | ||
52 | 50 | ||
53 | pattern ParPat ps <- ParPat_ _ ps | 51 | pattern 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 | ||
203 | lLet sn (SVar sn' i) l = rSubst 0 i l | 200 | lLet sn (SVar sn' i) l = rSubst 0 i l |
204 | lLet sn e l = LLet sn e l | 201 | lLet 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 | ||
228 | instance DeBruijnify SIName GuardTree where | 224 | instance DeBruijnify SIName GuardTree where |
229 | deBruijnify_ l ns = mapGT (`deBruijnify_` ns) (`deBruijnify_` ns) l | 225 | deBruijnify_ l ns = mapGT (`deBruijnify_` ns) (`deBruijnify_` ns) l |