X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=sem.dcl;h=6351c04369b0c83b12d447c031feb6c40c5b427a;hb=5b1c37a52f0d63d4972665f672df100a231a2f57;hp=92f1d51d4860276b98a5bef237cce59b90e48807;hpb=022b8166504765b2c84138fc83dfdfaa23fe5774;p=cc1516.git diff --git a/sem.dcl b/sem.dcl index 92f1d51..6351c04 100644 --- a/sem.dcl +++ b/sem.dcl @@ -1,7 +1,16 @@ 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 + | Error String +:: SemOutput :== Either [SemError] AST + + +instance toString SemError + +sem :: AST -> SemOutput