logo       

bug in ghc-6.4-src\libraries\base\Data\Version.hs: msg#00061

lang.haskell.glasgow.bugs

Subject: bug in ghc-6.4-src\libraries\base\Data\Version.hs

bug in ghc-6.4-src\libraries\base\Data\Version.hs:

instance Eq Version where
v1 == v2 = versionBranch v1 == versionBranch v2
&& all (`elem` (versionTags v2)) (versionTags v1)
-- tags may be in any order


this really checks that v1.tags is subset of v2.tags. must be changed to

import Data.List ( intersperse, sort )

instance Eq Version where
v1 == v2 = versionBranch v1 == versionBranch v2
&& sort (versionTags v1) == sort (versionTags v2)
-- tags may be in any order

--
Best regards,
Bulat mailto:bulatz@xxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise