]> ruin.nu Git - proglang.git/blobdiff - Typechecker.hs
replace E with in
[proglang.git] / Typechecker.hs
index fb6986c317591f0b732b6cb8283c8b132cb768e9..d9b1e1047b67d8b355dca3290ac93173b4e0417d 100644 (file)
@@ -15,9 +15,6 @@ import Typecheck
 import Control.Monad.State
 import Data.Map as Map hiding (showTree)
 
-
-
-
 import ErrM
 
 type ParseFun a = [Token] -> Err a
@@ -42,7 +39,8 @@ run v p s = let ts = myLLexer s in case p ts of
        Ok (Program s) -> do
                putStrLn "\nParse Successful!"
                showTree v (Program s)
-               runStateT (mapM typeCheckStm s) empty
+               runStateT (mapM typeCheckStm s) [empty]
+               print "The program is type-correct!!"
                return ()
 
 showTree :: (Show a, Print a) => Int -> a -> IO ()