diff options
Diffstat (limited to 'Types')
-rw-r--r-- | Types/Key.hs | 4 | ||||
-rw-r--r-- | Types/Remote.hs | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Types/Key.hs b/Types/Key.hs index 1d9bf8e11..b26bb8989 100644 --- a/Types/Key.hs +++ b/Types/Key.hs @@ -48,7 +48,7 @@ instance Show Key where "" +++ y = y x +++ "" = x x +++ y = x ++ fieldSep:y - c ?: (Just v) = c:(show v) + c ?: (Just v) = c : show v _ ?: _ = "" readKey :: String -> Maybe Key @@ -73,4 +73,4 @@ readKey s = if key == Just stubKey then Nothing else key addfield _ _ _ = Nothing prop_idempotent_key_read_show :: Key -> Bool -prop_idempotent_key_read_show k = Just k == (readKey $ show k) +prop_idempotent_key_read_show k = Just k == (readKey . show) k diff --git a/Types/Remote.hs b/Types/Remote.hs index 1d67ad5cd..8d9622c51 100644 --- a/Types/Remote.hs +++ b/Types/Remote.hs @@ -11,6 +11,7 @@ module Types.Remote where import Control.Exception import Data.Map as M +import Data.Ord import qualified Git import Types.Key @@ -62,4 +63,4 @@ instance Eq (Remote a) where -- order remotes by cost instance Ord (Remote a) where - compare x y = compare (cost x) (cost y) + compare = comparing cost |