On 08/09/10 22:19, Kevin Jardine wrote:
> Hi Tony,
>
> I stared at that specific section for at least half an hour earlier
> today but could not figure out how it applied in my specific case. The
> only examples I have see are for deriving Num. Do you have any more
> detail on how I could use that extension?
>
>
Here is an example:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
class C a where
c :: a -> Int
data G = G
instance C G where
c _ = 7
newtype H = H G deriving C
--
Tony Morris
http://tmorris.net/
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe