@@ -71,6 +71,9 @@ mergeSchemes schmss = do (ass,css,sss) <- unzip3 `liftM` mapM split kvs
7171 [] -> []
7272 , Map.fromList ps )
7373
74+--constrain :: Map.Map String Scheme
75+-- -> Module
76+-- -> GuidCounter (Either String Constraints)
7477constrain typeHints (Module _ _ imports stmts) = do
7578 (ass,css,schemess) <- unzip3 `liftM` mapM stmtGen stmts
7679 aliasHints <- getAliases imports `liftM` typeHints
@@ -86,8 +89,8 @@ constrain typeHints (Module _ _ imports stmts) = do
8689 escapees = Map.keys $ Map.difference assumptions allHints
8790 msg = "Warning! Type-checker could not find variables:\n" ++ intercalate ", " escapees
8891 return $ case escapees of
89− [] -> Right (constraints ++ cs)
90− _ -> unsafePerformIO (putStrLn msg) `seq` Right (constraints ++ cs)
92+ [] -> Right (schemess, constraints ++ cs)
93+ _ -> unsafePerformIO (putStrLn msg) `seq` Right (schemess, constraints ++ cs)
9194 --_ -> Left ("Undefined variable(s): " ++ intercalate ", " escapees)
9295
9396type TVarMap = Map.Map String [X]