summaryrefslogtreecommitdiff
path: root/prototypes
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2015-12-18 21:08:55 +0100
committerPéter Diviánszky <divipp@gmail.com>2015-12-18 21:08:55 +0100
commitaf68dd00ffc329baebce5d29798ee17dba706c38 (patch)
tree0aa4896e58292718a01d0f3a642262e10aefc58d /prototypes
parentd9562c0835ba6e1b1c8e5023cb30ff1b429f75c0 (diff)
cleanup
Diffstat (limited to 'prototypes')
-rw-r--r--prototypes/CGExp.hs3
-rw-r--r--prototypes/Infer.hs1
2 files changed, 1 insertions, 3 deletions
diff --git a/prototypes/CGExp.hs b/prototypes/CGExp.hs
index 92c2f2c4..d10e04bb 100644
--- a/prototypes/CGExp.hs
+++ b/prototypes/CGExp.hs
@@ -127,6 +127,7 @@ freeVars = \case
127 Lam _ n a b -> freeVars a `S.union` (foldr S.delete (freeVars b) (patVars n)) 127 Lam _ n a b -> freeVars a `S.union` (foldr S.delete (freeVars b) (patVars n))
128 EFieldProj a _ -> freeVars a 128 EFieldProj a _ -> freeVars a
129 TType -> mempty 129 TType -> mempty
130 ELet n a b -> freeVars a `S.union` (foldr S.delete (freeVars b) (patVars n))
130 131
131type Ty = Exp 132type Ty = Exp
132 133
@@ -190,8 +191,6 @@ infixr 1 :~>
190 191
191eLam p x = Lam Visible p (patTy p) x 192eLam p x = Lam Visible p (patTy p) x
192 193
193mkLam (Lam Visible (PVar _ n) t (Fun ("Tuple2Case", _) [_, _, motive, Lam Visible (PVar _ n1) t1 (Lam Visible (PVar _ n2) t2 body), Var n' _])) | n == n'
194 = Just (PTuple [PVar t1 n1, PVar t2 n2], body)
195mkLam (Lam Visible p t b) = Just (p, b) 194mkLam (Lam Visible p t b) = Just (p, b)
196mkLam _ = Nothing 195mkLam _ = Nothing
197 196
diff --git a/prototypes/Infer.hs b/prototypes/Infer.hs
index 09d38a63..2e6c3364 100644
--- a/prototypes/Infer.hs
+++ b/prototypes/Infer.hs
@@ -6,7 +6,6 @@
6{-# LANGUAGE NoMonomorphismRestriction #-} 6{-# LANGUAGE NoMonomorphismRestriction #-}
7{-# LANGUAGE OverloadedStrings #-} 7{-# LANGUAGE OverloadedStrings #-}
8{-# LANGUAGE DeriveFunctor #-} 8{-# LANGUAGE DeriveFunctor #-}
9{-# LANGUAGE RankNTypes #-}
10{-# LANGUAGE ScopedTypeVariables #-} 9{-# LANGUAGE ScopedTypeVariables #-}
11{-# LANGUAGE RecursiveDo #-} 10{-# LANGUAGE RecursiveDo #-}
12module Infer 11module Infer