Re: [Haskell-cafe] Instances for Set of Functor, Traversable?

2010-07-26 Thread Lennart Augustsson
Try to make Set an instance of Functor and you'll see why it isn't. It's very annoying. On Mon, Jul 26, 2010 at 11:55 PM, Gregory Crosswhite wrote: > Is there a specific reason why Set doesn't have instances for Functor > and Traversable?  Or have they just not been written yet?  :-) > > Cheers,

Re: [Haskell-cafe] Instances for Set of Functor, Traversable?

2010-07-26 Thread Henning Thielemann
On Mon, 26 Jul 2010, Gregory Crosswhite wrote: Is there a specific reason why Set doesn't have instances for Functor and Traversable? Sure, fmap needs an Ord restriction for the element type, which is not possible for the plain Functor constructor class. E.g. in fmap (const 'a') set all

[Haskell-cafe] Instances for Set of Functor, Traversable?

2010-07-26 Thread Gregory Crosswhite
Is there a specific reason why Set doesn't have instances for Functor and Traversable? Or have they just not been written yet? :-) Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe