X-Git-Url: https://ruin.nu/git/?p=proglang.git;a=blobdiff_plain;f=Typechecker.hs;fp=Typechecker.hs;h=19f5a6687e48373a196c6aba6178939a720485d9;hp=71810e698b7854109d0f728951f504b25ab45cda;hb=8fdc0177fdf518f63819e5b98dd0368fccca6175;hpb=74c984c4c70336e7b7618cd934db819263ceb565 diff --git a/Typechecker.hs b/Typechecker.hs index 71810e6..19f5a66 100644 --- a/Typechecker.hs +++ b/Typechecker.hs @@ -45,7 +45,7 @@ run v p s = let ts = myLLexer s in case p ts of 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 ()