Re: [Haskell-cafe] Fun with multi-parameter type classes

2004-08-20 Thread Henning Thielemann
On Thu, 19 Aug 2004, Sam Mason wrote: class Foo t where encode :: String - t decode :: t - String test = decode . encode This currently fails, because the type checker insists on trying to figure out what its type should be - even though it shouldn't be needed. In

[Haskell-cafe] Fun with multi-parameter type classes

2004-08-19 Thread Sam Mason
Hi, I've been getting into Haskell over the past few months and have just come up against a bit of a brick wall when trying to encapsulate some of the data structures in my code nicely. Basically what I want to have, is a type class where one of the intermediate values is opaque with respect to

Re: [Haskell-cafe] Fun with multi-parameter type classes

2004-08-19 Thread Marius Nita
On Thu, Aug 19, 2004 at 05:42:10PM +0100, Sam Mason wrote: Hi, I've been getting into Haskell over the past few months and have just come up against a bit of a brick wall when trying to encapsulate some of the data structures in my code nicely. Basically what I want to have, is a type

Re: [Haskell-cafe] Fun with multi-parameter type classes

2004-08-19 Thread Jon Cast
Hi, I've been getting into Haskell over the past few months and have just come up against a bit of a brick wall when trying to encapsulate some of the data structures in my code nicely. Basically what I want to have, is a type class where one of the intermediate values is opaque with