X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;ds=sidebyside;f=sem.dcl;h=a5705977b29780197eb20ccbb152a641a1422df9;hb=c5fb28639ae923d9b55f5832e45186911e610991;hp=0d4a7d6ad8f703d14239f1b960aa9341c94e4590;hpb=cba53fea01b27f46668e9025f8b04ce7a85e62d8;p=cc1516.git diff --git a/sem.dcl b/sem.dcl index 0d4a7d6..a570597 100644 --- a/sem.dcl +++ b/sem.dcl @@ -2,19 +2,15 @@ definition module sem import qualified Data.Map as Map from Data.Either import :: Either -from AST import :: AST, :: Pos, :: Type, :: FieldSelector +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 - | UndeclaredVariableError Pos String - | Error String :: Gamma :: SemOutput :== Either [SemError] (AST, Gamma) +:: Constraints :== [(Type, Type)] instance toString SemError instance toString Gamma -sem :: AST -> SemOutput +sem :: AST -> Either [SemError] (AST, Gamma)