X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=sem.dcl;h=584deb567792c7e75b67360be3fab9646c8bd3a6;hb=6d70a636ed3b4573c4c81ba068ae2b46523c9465;hp=6351c04369b0c83b12d447c031feb6c40c5b427a;hpb=4f162814483aa0ab4e11cab51e23f807bece906c;p=cc1516.git diff --git a/sem.dcl b/sem.dcl index 6351c04..584deb5 100644 --- a/sem.dcl +++ b/sem.dcl @@ -1,16 +1,22 @@ 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, :: Op2 from StdOverloaded import class toString :: SemError = ParseError Pos String | UnifyError Pos Type Type + | FieldSelectorError Pos Type FieldSelector + | OperatorError Pos Op2 Type + | UndeclaredVariableError Pos String + | ArgumentMisMatchError Pos String | Error String -:: SemOutput :== Either [SemError] AST - +:: Gamma +:: SemOutput :== Either [SemError] (AST, Gamma) instance toString SemError +instance toString Gamma sem :: AST -> SemOutput