From 9f95fa78463d7e6b047485bdce28f1a970a45fd2 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 17 Jul 2017 21:48:37 +0000 Subject: Initial commit --- Sil/Compile.dcl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Sil/Compile.dcl (limited to 'Sil/Compile.dcl') 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 -- cgit v1.2.3