Hi Derek, On 16 June 2012 21:53, Derek Elkins <derek.a.elk...@gmail.com> wrote: > The law that ends up failing is toList . > fromList /= id, i.e. fmap g . toList . fromList . fmap h /= fmap g . > fmap h
This is not related to functor laws. The property that you desire is about toList and fromList. The toList and fromList functions are not required to satisfy toList . fromList /= id. This does not hold for Data.Set and it does not hold for the Data.Set.Monad wrapper either. Duplicates are lost when lists are converted into sets. Other instances of fromList and toList also fail to satisfy the property that you desire (e.g., Map). Cheers, George _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe