RE: How to make Data.Set.Set a Functor

2005-10-12 Thread Simon Marlow
On 11 October 2005 17:16, Lajos Nagy wrote: > While working on a toy compiler I realized that Data.Set.Set (Set) is > not an instance of the Functor class. In other words: 'fmap' is not > defined on it. I tried various ways of defining an instance but I > failed. The reason is quite interesting

Re: How to make Data.Set.Set a Functor

2005-10-12 Thread Ketil Malde
Lajos Nagy <[EMAIL PROTECTED]> writes: > On the other hand, it seems intuitively natural to make Set an > instance of fmap. Indeed. While I generally like the overloaded, qualified names, I find it annoying when, like 'map', they clash with Prelude imports. Which means that, in a module using D

Re: How to make Data.Set.Set a Functor

2005-10-11 Thread Benjamin Franksen
On Tuesday 11 October 2005 18:16, Lajos Nagy wrote: > While working on a toy compiler I realized that Data.Set.Set (Set) is > not an instance of the Functor class. In other words: 'fmap' is not > defined on it. I tried various ways of defining an instance but I > failed. The reason is quite inte

How to make Data.Set.Set a Functor

2005-10-11 Thread Lajos Nagy
Hi, While working on a toy compiler I realized that Data.Set.Set (Set) is not an instance of the Functor class. In other words: 'fmap' is not defined on it. I tried various ways of defining an instance but I failed. The reason is quite interesting: Set is a type constructor (* -> *) so it