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/Compile.dcl | |
parent | Don't allow tuples with arity > 32 (ABC-machine limitation) (diff) |
Centralise errors (needed for positional errors #5)
Diffstat (limited to 'Sil/Compile.dcl')
-rw-r--r-- | Sil/Compile.dcl | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/Sil/Compile.dcl b/Sil/Compile.dcl index 7b0cf2f..61ee1b5 100644 --- a/Sil/Compile.dcl +++ b/Sil/Compile.dcl @@ -7,20 +7,7 @@ from Data.Error import :: MaybeError from ABC.Assembler import :: Assembler, :: Statement, instance <<< Assembler -from Sil.Syntax import :: Program, :: Name, :: Expression -from Sil.Types import :: Type, :: TypeError +from Sil.Error import :: Error +from Sil.Syntax import :: Program -:: CompileError - = UndefinedName Name - | UndefinedField Name - | VariableLabel - | FunctionOnStack - | TypeError TypeError Expression - | CouldNotDeduceType Expression - | TypeMisMatch Type Expression - | BasicInitWithoutValue Name - | UnknownError - -instance toString CompileError - -compile :: Program -> MaybeError CompileError Assembler +compile :: Program -> MaybeError Error Assembler |