
8 Sep
2010
8 Sep
'10
8:24 a.m.
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/