X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FVersion.hs;h=1b02c6f15eac9a46321c9af99d4d03253c6519e0;hb=12c838854d0f81c6cf1af8c2f0f38e7a3e508a7f;hp=c52d21c6e649a620297eab4f86a77906e959cd3b;hpb=819adca5f17b40ee129e4a30edf685f817febbf9;p=ghc-base.git diff --git a/Data/Version.hs b/Data/Version.hs index c52d21c..1b02c6f 100644 --- a/Data/Version.hs +++ b/Data/Version.hs @@ -51,7 +51,7 @@ import Data.Dynamic ( Typeable(..), TyCon, mkTyCon, mkAppTy ) import Data.Typeable ( Typeable ) #endif -import Data.List ( intersperse ) +import Data.List ( intersperse, sort ) import Control.Monad ( liftM ) import Data.Char ( isDigit, isAlphaNum ) @@ -120,8 +120,8 @@ instance Typeable Version where instance Eq Version where v1 == v2 = versionBranch v1 == versionBranch v2 - && all (`elem` (versionTags v2)) (versionTags v1) - -- tags may be in any order + && sort (versionTags v1) == sort (versionTags v2) + -- tags may be in any order instance Ord Version where v1 `compare` v2 = versionBranch v1 `compare` versionBranch v2