aboutsummaryrefslogtreecommitdiff
path: root/Sil/Compile.dcl
diff options
context:
space:
mode:
authorCamil Staps2017-07-27 23:32:59 +0200
committerCamil Staps2017-07-27 23:32:59 +0200
commitc23b7cd159af38f588ce4214d6ad37ceadf3c1a6 (patch)
tree66dc800514550a3729fe3e9578fb6fe00f18bfa1 /Sil/Compile.dcl
parentDon'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.dcl19
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