logo       

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

lang.haskell.glasgow.bugs

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

On 07 July 2005 19:57, Bulat Ziganshin wrote:

> 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

Good point - fixed now, thanks.

Cheers,
Simon


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

News | FAQ | advertise