[Haskell-cafe] Polymorphic (typeclass) values in a list?

TJ tjay.dreaming at gmail.com
Tue Oct 23 01:54:48 EDT 2007


On 10/22/07, Tim Docker <timd at macquarie.com.au> wrote:
> [...]
> You may then like to add a type class to turn things into renderables:
>
> class IsRenderable where
>     toRenderable :: a -> Renderable
>
> instance IsRendeable Point where ...
> instance IsRenderable Line where ...
> [...]

Cool. I should get more familiar with basic Haskell98 before I decide
on using GHC extensions...

Thanks,

TJ


More information about the Haskell-Cafe mailing list