repositories
/
cc1516.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'mastert push ' of github.com:dopefishh/cc1516
[cc1516.git]
/
sem.dcl
diff --git
a/sem.dcl
b/sem.dcl
index
5c01ba0
..
e981361
100644
(file)
--- a/
sem.dcl
+++ b/
sem.dcl
@@
-1,15
+1,21
@@
definition module sem
definition module sem
+import qualified Data.Map as Map
from Data.Either import :: Either
from Data.Either import :: Either
-from AST import :: AST, :: Pos, :: Type
+from AST import :: AST, :: Pos, :: Type, :: FieldSelector, :: Op2
+from StdOverloaded import class toString
:: SemError
= ParseError Pos String
| UnifyError Pos Type Type
:: SemError
= ParseError Pos String
| UnifyError Pos Type Type
+ | FieldSelectorError Pos Type FieldSelector
+ | OperatorError Pos Op2 Type
+ | UndeclaredVariableError Pos String
| Error String
| Error String
-::
SemOutput :== Either [SemError] AST
-
+::
Gamma
+:: SemOutput :== Either [SemError] (AST, Gamma)
instance toString SemError
instance toString SemError
+instance toString Gamma
sem :: AST -> SemOutput
sem :: AST -> SemOutput