X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=sem.dcl;h=b34bbc35e8f98f60f5e71a6c73b40d461df60f09;hb=6e5d435a99f84ad4f4f7cb4f6a41c28b79c29ab3;hp=92f1d51d4860276b98a5bef237cce59b90e48807;hpb=022b8166504765b2c84138fc83dfdfaa23fe5774;p=cc1516.git diff --git a/sem.dcl b/sem.dcl index 92f1d51..b34bbc3 100644 --- a/sem.dcl +++ b/sem.dcl @@ -1,7 +1,17 @@ definition module sem from Data.Either import :: Either -from AST import :: AST -from lex import :: Error +from AST import :: AST, :: Pos, :: Type +from StdOverloaded import class toString -semanticAnalysis :: AST -> Either String AST +:: SemError + = ParseError Pos String + | UnifyError Pos Type Type + | UnifyErrorStub Type Type + | Error String +:: SemOutput :== Either [SemError] AST + + +instance toString SemError + +sem :: AST -> SemOutput