summaryrefslogtreecommitdiff
path: root/src/LambdaCube/Compiler/Infer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/LambdaCube/Compiler/Infer.hs')
-rw-r--r--src/LambdaCube/Compiler/Infer.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/LambdaCube/Compiler/Infer.hs b/src/LambdaCube/Compiler/Infer.hs
index eb7f3681..35146c86 100644
--- a/src/LambdaCube/Compiler/Infer.hs
+++ b/src/LambdaCube/Compiler/Infer.hs
@@ -246,8 +246,10 @@ pattern LabelEnd x = LabelEnd_ LEPM x
246 246
247label LabelFix x y = FixLabel x y 247label LabelFix x y = FixLabel x y
248pmLabel :: FunName -> Int -> [Exp] -> Exp -> Exp 248pmLabel :: FunName -> Int -> [Exp] -> Exp -> Exp
249pmLabel _ _ _ (unlabel -> LabelEnd y) = y 249pmLabel _ _ _ (unlabel'' -> LabelEnd y) = y
250pmLabel f i xs y = PMLabel f i xs y 250pmLabel f i xs y@Neut{} = PMLabel f i xs y
251pmLabel f i xs y@Lam{} = PMLabel f i xs y
252--pmLabel f i xs y = trace_ (ppShow y) $ PMLabel f i xs y
251 253
252pattern UL a <- (unlabel -> a) where UL = unlabel 254pattern UL a <- (unlabel -> a) where UL = unlabel
253 255
@@ -659,7 +661,6 @@ app_ (Con s n xs) a = if n < conParams s then Con s (n+1) xs else Con s n (xs ++
659app_ (TyCon s xs) a = TyCon s (xs ++ [a]) 661app_ (TyCon s xs) a = TyCon s (xs ++ [a])
660app_ (Label lk x e) a = label lk (app_ x a) $ app_ e a 662app_ (Label lk x e) a = label lk (app_ x a) $ app_ e a
661app_ (LabelEnd_ k x) a = LabelEnd_ k (app_ x a) -- ??? 663app_ (LabelEnd_ k x) a = LabelEnd_ k (app_ x a) -- ???
662--app_ (PMLabel x e) a = pmLabel (neutApp x a) $ app_ e a
663app_ (Neut f) a = neutApp f a 664app_ (Neut f) a = neutApp f a
664 665
665neutApp (PMLabel_ f i xs e) a 666neutApp (PMLabel_ f i xs e) a