From 4a2f1e623bd79f5583cd9c50d2543bb71e0dbb76 Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Tue, 19 Jun 2012 21:03:01 +0200 Subject: [PATCH] classfile: add Ord instance for some types MateVM uses `MethodSignature' as a key in Data.Map, therefore we need `Ord' --- JVM/ClassFile.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/JVM/ClassFile.hs b/JVM/ClassFile.hs index 217e7bc..68ea764 100644 --- a/JVM/ClassFile.hs +++ b/JVM/ClassFile.hs @@ -310,7 +310,7 @@ data FieldType = | BoolType -- ^ Z | ObjectType String -- ^ L @{class name}@ | Array (Maybe Int) FieldType -- ^ @[{type}@ - deriving (Eq) + deriving (Eq, Ord) instance Show FieldType where show SignedByte = "byte" @@ -396,7 +396,7 @@ getToSemicolon = do data ReturnSignature = Returns FieldType | ReturnsVoid - deriving (Eq) + deriving (Eq, Ord) instance Show ReturnSignature where show (Returns t) = show t @@ -418,7 +418,7 @@ type ArgumentSignature = FieldType -- | 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 -- 2.25.1