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/Parse.dcl | |
parent | Don't allow tuples with arity > 32 (ABC-machine limitation) (diff) |
Centralise errors (needed for positional errors #5)
Diffstat (limited to 'Sil/Parse.dcl')
-rw-r--r-- | Sil/Parse.dcl | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Sil/Parse.dcl b/Sil/Parse.dcl index d5bf453..441bf9e 100644 --- a/Sil/Parse.dcl +++ b/Sil/Parse.dcl @@ -4,6 +4,7 @@ from StdOverloaded import class ==, class toString from Data.Error import :: MaybeError +from Sil.Error import :: Error from Sil.Syntax import :: Program, :: Literal from Sil.Util.Parser import class name @@ -38,13 +39,6 @@ instance == Token instance toString Token instance name Token -:: ParseError - = E.a: Invalid String a & toString a - | Expected String - | UnknownError +tokenise :: [Char] -> MaybeError Error [Token] -instance toString ParseError - -tokenise :: [Char] -> MaybeError ParseError [Token] - -parse :: ([Token] -> MaybeError ParseError Program) +parse :: ([Token] -> MaybeError Error Program) |