Re: [Haskell] What is the best way to write adapters?

2004-03-12 Thread Ben_Yu
, could make the implementation simpler. Brandon Michael Moore [EMAIL PROTECTED]@haskell.org on 03/11/2004 06:56:41 PM Sent by:[EMAIL PROTECTED] To:[EMAIL PROTECTED] cc:[EMAIL PROTECTED], [EMAIL PROTECTED] Subject:Re: [Haskell] What is the best way to write adapters? On Thu, 11

Re: [Haskell] What is the best way to write adapters?

2004-03-11 Thread Ben_Yu
Thanks! Oleg. This works and it looks nice! And now, my code can be like: class FwdSig d where (forall a. Sig a = a - w) - d - w All the types that supports such forwarding are instances of FwdSig. My Def type is: instance FwdSig Def where fwd f (ClassDef c) = f c fwd f (ProtDef p)

Re: [Haskell] What is the best way to write adapters?

2004-03-11 Thread Brandon Michael Moore
On Thu, 11 Mar 2004 [EMAIL PROTECTED] wrote: Thanks! Oleg. This works and it looks nice! And now, my code can be like: class FwdSig d where (forall a. Sig a = a - w) - d - w All the types that supports such forwarding are instances of FwdSig. My Def type is: instance FwdSig Def