From c23b7cd159af38f588ce4214d6ad37ceadf3c1a6 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 27 Jul 2017 23:32:59 +0200 Subject: Centralise errors (needed for positional errors #5) --- Sil/Types.dcl | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'Sil/Types.dcl') 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 -- cgit v1.2.3