@@ -16,6 +16,8 @@ import Guid
16import Types.Types
16import Types.Types
17import qualified Types.Substitutions as Subs
17import qualified Types.Substitutions as Subs
19+import System.IO.Unsafe
19beta = VarT `liftM` guid
21beta = VarT `liftM` guid
20unionA = Map.unionWith (++)
22unionA = Map.unionWith (++)
21unionsA = Map.unionsWith (++)
23unionsA = Map.unionsWith (++)
@@ -73,8 +75,9 @@ constrain typeHints (Module _ _ imports stmts) = do
73 cs = concat . Map.elems $ Map.intersectionWithKey f allHints assumptions
75 cs = concat . Map.elems $ Map.intersectionWithKey f allHints assumptions
74 escapees = Map.keys $ Map.difference assumptions allHints
76 escapees = Map.keys $ Map.difference assumptions allHints
75 return $ case escapees of
77 return $ case escapees of
78+ [] -> Right (Set.toList constraints ++ cs)
76− _ -> Right (Set.toList constraints ++ cs)
79+ _ -> unsafePerformIO (print escapees) `seq` Right (Set.toList constraints ++ cs)
77− --_ -> Left ("Undefined variable(s): " ++ intercalate ", " escapees)
80+ _ -> Left ("Undefined variable(s): " ++ intercalate ", " escapees)
79type TVarMap = Map.Map String [X]
82type TVarMap = Map.Map String [X]
80type ConstraintSet = Set.Set (Context Constraint)
83type ConstraintSet = Set.Set (Context Constraint)