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}@
- deriving (Eq)
+ deriving (Eq, Ord)
instance Show FieldType where
show SignedByte = "byte"
data ReturnSignature =
Returns FieldType
| ReturnsVoid
- deriving (Eq)
+ deriving (Eq, Ord)
instance Show ReturnSignature where
show (Returns t) = show t
-- | Class method argument signature
data MethodSignature =
MethodSignature [ArgumentSignature] ReturnSignature
- deriving (Eq)
+ deriving (Eq, Ord)
instance Show MethodSignature where
show (MethodSignature args ret) = "(" ++ intercalate ", " (map show args) ++ ") returns " ++ show ret