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.icl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sil.icl') diff --git a/sil.icl b/sil.icl index 29636e2..0483084 100644 --- a/sil.icl +++ b/sil.icl @@ -23,7 +23,7 @@ import ABC.Assembler from Sil.Check import :: CheckError, checkProgram import qualified Sil.Compile as SC -from Sil.Compile import :: CompileError, instance toString CompileError +import Sil.Error import Sil.Parse from Sil.Syntax import :: Program import Sil.Util.Parser @@ -119,7 +119,7 @@ where <|> item "--generate" *> pure (\cli -> {cli & generate=True}) <|> item "--run" *> pure (\cli -> {cli & run=True}) <|> (satisfy isFilename >>= \name -> pure (\cli -> {cli & inputfile=name})) - Invalid "command line argument" opt + P_Invalid "command line argument" opt ) isFilename :: (String -> Bool) @@ -142,4 +142,4 @@ where <<< f (Ok a) = f <<< a <<< f (Error e) = f <<< e -instance <<< CompileError where <<< f e = f <<< toString e +instance <<< Error where <<< f e = f <<< toString e -- cgit v1.2.3