diff options
author | 2014-02-12 22:01:24 -0400 | |
---|---|---|
committer | 2014-02-12 22:01:24 -0400 | |
commit | 70aef104847247accc8da34e77c096672737a63f (patch) | |
tree | 60ca2036ef951e86184e0ef69e5b0d5ff69dda66 /Types/MetaData.hs | |
parent | e0eef9979943e67226ca606e1aaa58c9a18a1d40 (diff) |
fix Ord instance for MetaValue to work like Eq instance
Diffstat (limited to 'Types/MetaData.hs')
-rw-r--r-- | Types/MetaData.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Types/MetaData.hs b/Types/MetaData.hs index a8be9231d..53a9b6944 100644 --- a/Types/MetaData.hs +++ b/Types/MetaData.hs @@ -53,11 +53,13 @@ newtype MetaField = MetaField String deriving (Show, Eq, Ord) data MetaValue = MetaValue CurrentlySet String - deriving (Show, Ord) + deriving (Show) -{- Metadata values are compared equal whether currently set or not. -} +{- Metadata values compare and order the same whether currently set or not. -} instance Eq MetaValue where MetaValue _ a == MetaValue _ b = a == b +instance Ord MetaValue where + compare (MetaValue _ x) (MetaValue _ y) = compare x y {- MetaData is serialized to a format like: - |