diff options
author | Camil Staps | 2017-07-27 23:32:59 +0200 |
---|---|---|
committer | Camil Staps | 2017-07-27 23:32:59 +0200 |
commit | c23b7cd159af38f588ce4214d6ad37ceadf3c1a6 (patch) | |
tree | 66dc800514550a3729fe3e9578fb6fe00f18bfa1 /Sil/Types.dcl | |
parent | Don't allow tuples with arity > 32 (ABC-machine limitation) (diff) |
Centralise errors (needed for positional errors #5)
Diffstat (limited to 'Sil/Types.dcl')
-rw-r--r-- | Sil/Types.dcl | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Sil/Types.dcl b/Sil/Types.dcl index 013f064..51d4229 100644 --- a/Sil/Types.dcl +++ b/Sil/Types.dcl @@ -7,6 +7,7 @@ from Data.Maybe import :: Maybe from ABC.Assembler import :: BasicType +from Sil.Error import :: Error from Sil.Syntax import :: Expression, :: Function, :: Name, :: Op1, :: Op2 :: Type @@ -16,11 +17,6 @@ from Sil.Syntax import :: Expression, :: Function, :: Name, :: Op1, :: Op2 | (-->) infixr Type Type | TTuple Int [Type] -:: TypeError - = IllegalApplication Type Type - | IllegalField Name Type - | TooHighTupleArity Int - :: TypeSize = { asize :: Int , bsize :: Int @@ -30,7 +26,6 @@ from Sil.Syntax import :: Expression, :: Function, :: Name, :: Op1, :: Op2 instance == Type instance toString Type -instance toString TypeError instance zero TypeSize @@ -42,11 +37,11 @@ typeSize :: Type -> TypeSize (+~) infixl 6 :: TypeSize TypeSize -> TypeSize (-~) infixl 6 :: TypeSize TypeSize -> TypeSize -:: TypeResolver :== Name -> Maybe (MaybeError TypeError Type) +:: TypeResolver :== Name -> Maybe (MaybeError Error Type) instance zero TypeResolver -class type a :: TypeResolver a -> Maybe (MaybeError TypeError Type) +class type a :: TypeResolver a -> Maybe (MaybeError Error Type) instance type Function instance type Expression instance type Name |