]> ruin.nu Git - proglang.git/blobdiff - Typecheck.hs
interpreter compiles
[proglang.git] / Typecheck.hs
index bfef73a68a318cc46188649474881eab2760c4d0..a701b6e85bf92a0e9f0807251e5eecbfa83c7592 100644 (file)
@@ -1,4 +1,4 @@
-module Typecheck (typeCheckExp, typeCheckStm, typeCheckVar, typeCheckFunction, addFunction, State(..)) where 
+module Typecheck (typeCheckExp, typeCheckStm, typeCheckVar, typeCheckFunction, addFunction, emptyState, State(..)) where 
 
 
 import Abssyntax
@@ -11,6 +11,7 @@ type Function = (Type, [Type])
 
 data State = State {variables::Types,functions::(Map Ident Function),function::Ident}
 
+emptyState = State{variables=[empty], functions=(empty), function=(Ident "")}
 
 inList :: Eq a => a -> [a] -> Bool
 inList _ [] = False