[Haskell-cafe] partial inheritance

Maciej Marcin Piechotka uzytkownik2 at gmail.com
Tue Jul 19 03:31:01 CEST 2011


On Tue, 2011-07-19 at 01:13 +0200, Yves Parès wrote:
> Oh, I got it: You want to have:
> 
> class Bird b where
> 
> class Penguin p where
> 
> instance (Penguin b) => Bird b where
>    fly = -- fly method for penguins
> 

I haven't followed the thread carefully but why does the bird have to be
a penguin?

----------

As a side note - I agree with Christopher Done that the answer is that
you shouldn't require for bird to fly.

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110719/5e1ae24f/attachment.pgp>


More information about the Haskell-Cafe mailing list