X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=sem.dcl;h=5c01ba0c5dcbec8ecb3394e5e9a157ce779674ac;hb=8c4ec1c3287d6c6ddefd22ef608a4d97693e7e85;hp=be207dd4a4d89183238b337dea0cdd3186a53cda;hpb=c270b0fc79caa24c08c2d00c2e8205bbd47921ed;p=cc1516.git diff --git a/sem.dcl b/sem.dcl index be207dd..5c01ba0 100644 --- a/sem.dcl +++ b/sem.dcl @@ -1,10 +1,15 @@ definition module sem from Data.Either import :: Either -from AST import :: AST -from lex import :: Error -from parse import :: ParserOutput +from AST import :: AST, :: Pos, :: Type -:: SemOutput :== Either Error AST +:: SemError + = ParseError Pos String + | UnifyError Pos Type Type + | Error String +:: SemOutput :== Either [SemError] AST -sem :: ParserOutput -> SemOutput + +instance toString SemError + +sem :: AST -> SemOutput