[Haskell-cafe] Factoring into type classes

Thomas DuBuisson thomas.dubuisson at gmail.com
Mon Jan 19 08:42:51 EST 2009


2009/1/19 Luke Palmer <lrpalmer at gmail.com>:
> On Mon, Jan 19, 2009 at 3:58 AM, Patai Gergely <patai_gergely at fastmail.fm>
> wrote:
>>
>> However, there are other type classes that are too general to assign
>> such concrete uses to. For instance, if a data structure can have more
>> than one meaningful (and useful) Functor or Monoid instance,
>
> As a side curiosity, I would love to see an example of any data structure
> which has more than one Functor instance.  Especially those which have more
> than one useful functor instance.
> Luke

The recent, and great, blog post about moniods [1] discusses the fact
that (Num a) could be one of several different monoids and how that
was handled.

[1] http://sigfpe.blogspot.com/2009/01/haskell-monoids-and-their-uses.html


More information about the Haskell-Cafe mailing list