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

Simon Marlow simonmar at microsoft.com
Fri Jul 8 11:32:25 EDT 2005


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



More information about the Glasgow-haskell-bugs mailing list