Ontwerpbesluitendocumentje toegevoegd
[cc1516.git] / sem.icl
diff --git a/sem.icl b/sem.icl
index 2003038..1cb9e54 100644 (file)
--- a/sem.icl
+++ b/sem.icl
@@ -1,6 +1,26 @@
 implementation module sem
 
+from Data.Map import :: Map
+import Data.Either
+import Control.Monad.State
 import StdMisc
 
-semanticAnalysis :: AST -> Either Error AST
-semanticAnalysis a = 
+import AST
+from parse import :: ParserOutput
+from yard import :: Error
+
+:: Gamma :== Map String Type
+:: Env a :== State Gamma a
+
+sem :: ParserOutput -> SemOutput
+sem (Left p) = Left p
+sem (Right (AST vd fd)) = undef
+//     foldM semVarDecl vd 
+//     >>= \gamma ->foldM typecheck gamma fd
+
+semVarDecl :: Env VarDecl
+semVarDecl = undef
+       
+
+
+