From b78d4f28adee1d0dab1dd7626650a3c767cd7cb8 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 12 Sep 2022 08:01:09 +0100 Subject: Some checks --- src/Micro/Error.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Micro/Error.hs') diff --git a/src/Micro/Error.hs b/src/Micro/Error.hs index ced1318..e82c0da 100644 --- a/src/Micro/Error.hs +++ b/src/Micro/Error.hs @@ -4,7 +4,7 @@ import Data.List (sort) import Text.Parsec (SourcePos, errorPos) import Text.Parsec.Error (ParseError, errorMessages, showErrorMessages) -data ErrorType = GenericError | TypeError | UnexpectedReturn | AlreadyDefined | NonCallable | Undefined | UndefinedType | InvalidTarget deriving (Show) +data ErrorType = GenericError | TypeError | UnexpectedReturn | AlreadyDefined | NonCallable | Undefined | UndefinedType | InvalidTarget | InvalidOperation deriving (Show) instance Enum ErrorType where fromEnum GenericError = 0 @@ -15,6 +15,7 @@ instance Enum ErrorType where fromEnum Undefined = 5 fromEnum UndefinedType = 6 fromEnum InvalidTarget = 7 + fromEnum InvalidOperation = 8 toEnum _ = error "toEnum is undefined for Error" data Error = Error ErrorType String SourcePos -- cgit v1.2.3