Merge branch 'master' of https://github.com/dopefishh/cc1516
[cc1516.git] / sem.icl
diff --git a/sem.icl b/sem.icl
index 833d543..0c5b552 100644 (file)
--- a/sem.icl
+++ b/sem.icl
@@ -50,8 +50,8 @@ variableStream = map toString [1..]
 
 defaultGamma :: Gamma //includes all default functions
 defaultGamma = extend "print" (Forall ["a"] ((IdType "a") ->> VoidType))
-                $ extend "isEmpty" (Forall ["a"] (ListType (IdType "a") ->> BoolType))
-                $ extend "read" (Forall [] (IntType ->> (ListType CharType)))
+                $ extend "isEmpty" (Forall ["a"] ((ListType (IdType "a")) ->> BoolType))
+                $ extend "read" (Forall [] CharType)
                 zero
 
 sem :: AST -> Either [SemError] AST
@@ -178,7 +178,6 @@ generalize :: Type -> Typing Scheme
 generalize t = gamma >>= \g-> pure $ Forall (difference (ftv t) (ftv g)) t
 
 lookup :: String -> Typing Type 
-lookup "isEmpty" = ListType <$> fresh
 lookup k = gamma >>= \g-> case 'Map'.member k g of
     False = liftT (Left $ UndeclaredVariableError zero k)
     True = instantiate $ 'Map'.find k g