sem :: AST -> SemOutput
sem (AST vd fd) = case evalStateT m ('Map'.newMap, getRandomStream 1) of
Left e = Left [e]
- Right (vds, fds) = Right (AST vds fds)
+ Right ((vds, fds), gamma) = Right ((AST vds fds), gamma)
where
m :: Env (([VarDecl], [FunDecl]))
m = (mapM semVarDecl vd) >>= \vds ->
extrPos (BoolExpr p _) = p
extrPos (FunExpr p _) = p
extrPos (EmptyListExpr p) = p
-extrPos (TupleExpr p _) = p
\ No newline at end of file
+extrPos (TupleExpr p _) = p
+
+instance toString Gamma where
+ toString (mp, _) = concat
+ [concat [k, ": ", toString v, "\n"]\\(k, v) <- 'Map'.toList mp]