definition module Sil.Types from StdOverloaded import class ==, class +, class toString, class zero from Data.Error import :: MaybeError from Data.Maybe import :: Maybe from ABC.Assembler import :: BasicType from Sil.Syntax import :: Expression, :: Function, :: Name, :: Op1, :: Op2 :: Type = TBool | TInt | TVoid | (-->) infixr Type Type | TTuple Int [Type] :: TypeError = IllegalApplication Type Type | IllegalField Name Type :: TypeSize = { asize :: Int , bsize :: Int , btypes :: [BasicType] } instance == Type instance toString Type instance toString TypeError instance zero TypeSize /** * Size of an expression on the stack */ typeSize :: Type -> TypeSize (+~) infixl 6 :: TypeSize TypeSize -> TypeSize (-~) infixl 6 :: TypeSize TypeSize -> TypeSize :: TypeResolver :== Name -> Maybe (MaybeError TypeError Type) instance zero TypeResolver class type a :: TypeResolver a -> Maybe (MaybeError TypeError Type) instance type Function instance type Expression instance type Name instance type Op1 instance type Op2