X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=sem.dcl;h=0d4a7d6ad8f703d14239f1b960aa9341c94e4590;hb=cba53fea01b27f46668e9025f8b04ce7a85e62d8;hp=5c01ba0c5dcbec8ecb3394e5e9a157ce779674ac;hpb=8c4ec1c3287d6c6ddefd22ef608a4d97693e7e85;p=cc1516.git diff --git a/sem.dcl b/sem.dcl index 5c01ba0..0d4a7d6 100644 --- a/sem.dcl +++ b/sem.dcl @@ -1,15 +1,20 @@ definition module sem +import qualified Data.Map as Map from Data.Either import :: Either -from AST import :: AST, :: Pos, :: Type +from AST import :: AST, :: Pos, :: Type, :: FieldSelector +from StdOverloaded import class toString :: SemError = ParseError Pos String | UnifyError Pos Type Type + | FieldSelectorError Pos Type FieldSelector + | UndeclaredVariableError Pos String | Error String -:: SemOutput :== Either [SemError] AST - +:: Gamma +:: SemOutput :== Either [SemError] (AST, Gamma) instance toString SemError +instance toString Gamma sem :: AST -> SemOutput