Ok (Program s) -> let (fun,st) = splitFunStm (s) in do
putStrLn "\nParse Successful!"
showTree v (Program s)
- runStateT (do mapM addFunction fun; mapM typeCheckFunction fun; mapM typeCheckStm st) State{variables=[empty], functions=(empty), function=(Ident "")}
+ runStateT (do mapM addFunction fun; mapM typeCheckFunction fun; mapM typeCheckStm st) emptyState
print "The program is type-correct!!"
return ()