diff options
Diffstat (limited to 'Sil/Compile.dcl')
-rw-r--r-- | Sil/Compile.dcl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Sil/Compile.dcl b/Sil/Compile.dcl new file mode 100644 index 0000000..6407b67 --- /dev/null +++ b/Sil/Compile.dcl @@ -0,0 +1,20 @@ +definition module Sil.Compile + +from StdFile import class <<< +from StdOverloaded import class toString + +from Data.Error import :: MaybeError + +from ABC.Assembler import :: Assembler, :: Statement, instance <<< Assembler + +from Sil.Syntax import :: Program, :: Name + +:: CompileError + = UndefinedName Name + | VariableLabel + | FunctionOnStack + | UnknownError + +instance toString CompileError + +compile :: Program -> MaybeError CompileError Assembler |