From bc950badd0655328af7a9886988722809e367d07 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 20 Jul 2017 20:25:25 +0000 Subject: Type checking --- Sil/Syntax.icl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'Sil/Syntax.icl') diff --git a/Sil/Syntax.icl b/Sil/Syntax.icl index 8083eba..43d27fc 100644 --- a/Sil/Syntax.icl +++ b/Sil/Syntax.icl @@ -9,6 +9,7 @@ import Data.List import Data.Maybe import Text +import Sil.Types import Sil.Util.Printer instance toString Statement @@ -21,12 +22,6 @@ where toString (MachineStm s) = "|~" <+ s toString _ = "<>" -instance toString Type -where - toString TBool = "Bool" - toString TInt = "Int" - toString TVoid = "Void" - instance toString Arg where toString arg = arg.arg_type <+ " " <+ arg.arg_name instance toString Expression @@ -96,8 +91,3 @@ where instance allLocals CodeBlock where allLocals cb = [(i.init_type, i.init_name) \\ i <- cb.cb_init] - -typeSize :: Type -> Int -typeSize TVoid = 0 -typeSize TBool = 1 -typeSize TInt = 1 -- cgit v1.2.3