MateVM uses `MethodSignature' as a key in Data.Map, therefore we need `Ord'
| BoolType -- ^ Z
| ObjectType String -- ^ L @{class name}@
| Array (Maybe Int) FieldType -- ^ @[{type}@
| BoolType -- ^ Z
| ObjectType String -- ^ L @{class name}@
| Array (Maybe Int) FieldType -- ^ @[{type}@
instance Show FieldType where
show SignedByte = "byte"
instance Show FieldType where
show SignedByte = "byte"
data ReturnSignature =
Returns FieldType
| ReturnsVoid
data ReturnSignature =
Returns FieldType
| ReturnsVoid
instance Show ReturnSignature where
show (Returns t) = show t
instance Show ReturnSignature where
show (Returns t) = show t
-- | Class method argument signature
data MethodSignature =
MethodSignature [ArgumentSignature] ReturnSignature
-- | Class method argument signature
data MethodSignature =
MethodSignature [ArgumentSignature] ReturnSignature
instance Show MethodSignature where
show (MethodSignature args ret) = "(" ++ intercalate ", " (map show args) ++ ") returns " ++ show ret
instance Show MethodSignature where
show (MethodSignature args ret) = "(" ++ intercalate ", " (map show args) ++ ") returns " ++ show ret