@@ -14,8 +14,6 @@ import Types.Types
1414import Types.Constrain
1515import Types.Substitutions
1616
17−import System.IO.Unsafe
18−
1917isSolved ss (C _ _ (t1 :=: t2)) = t1 == t2
2018isSolved ss (C _ _ (x :<<: _)) = isJust (lookup x ss)
2119isSolved ss c = False
@@ -54,10 +52,8 @@ schemeSub' x s c@(C txt span constraint) =
5452 c' = y :<<: Forall (cxs ++ xs) constraints (subst ss ctipe)
5553 return [ C txt span c' ]
5654
57−p x = unsafePerformIO (print x) `seq` x
58−
5955recordConstraints eq fs t fs' t' =
60− liftM (p . concat) . sequence $
56+ liftM concat . sequence $
6157 [ constrain fs fs'
6258 , liftM concat . mapM (\(k,ts) -> zipper [] k ts []) . Map.toList $
6359 Map.difference fs fs'
@@ -76,10 +72,10 @@ recordConstraints eq fs t fs' t' =
7672 ([],[]) -> return cs
7773 (as,[]) -> do x <- guid
7874 let tipe = RecordT (Map.singleton k as) (VarT x)
79− return . p $ (cs ++ [eq t' tipe])
75+ return (cs ++ [eq t' tipe])
8076 ([],bs) -> do x <- guid
8177 let tipe = RecordT (Map.singleton k bs) (VarT x)
82− return . p $ (cs ++ [eq t tipe])
78+ return (cs ++ [eq t tipe])
8379
8480solver :: [Context Constraint]
8581 -> Map.Map X Type
@@ -98,7 +94,6 @@ solver (C txt span c : cs) subs =
9894 solver ([ eq t1 t1', eq t2 t2' ] ++ cs) subs
9995
10096 RecordT fs t :=: RecordT fs' t' ->
101− unsafePerformIO (print c) `seq`
10297 do cs' <- recordConstraints eq fs t fs' t'
10398 solver (cs' ++ cs) subs
10499