import Control.Monad.State
import Data.Map as Map hiding (showTree)
-
-
-
import ErrM
type ParseFun a = [Token] -> Err a
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 ()