Re: [Haskell-cafe] type class design

2010-12-21 Thread Jean-Marie Gaillourdet
Hi, sorry for answering to such an old thread. David Menendez d...@zednenem.com writes: On Fri, Oct 29, 2010 at 8:33 AM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Hi, Uwe Schmidt wrote: In the standard Haskell classes we can find both cases, even within a single class.

Re: [Haskell-cafe] type class design

2010-12-21 Thread David Menendez
On Tue, Dec 21, 2010 at 4:30 AM, Jean-Marie Gaillourdet j...@gaillourdet.net wrote: Hi, sorry for answering to such an old thread. David Menendez d...@zednenem.com writes: On Fri, Oct 29, 2010 at 8:33 AM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Hi, Uwe Schmidt wrote:

Re: [Haskell-cafe] type class design

2010-10-31 Thread Ivan Lazar Miljenovic
On 30 October 2010 22:44, Uwe Schmidt u...@fh-wedel.de wrote: Another possible argument: large type classes can look daunting for both implementors and users, even if only one or two methods need to be defined for a minimal instantiation (I'm tring to work out what to do here myself, as I have

Re: [Haskell-cafe] type class design

2010-10-30 Thread Uwe Schmidt
Hi Ivan, Another possible argument: large type classes can look daunting for both implementors and users, even if only one or two methods need to be defined for a minimal instantiation (I'm tring to work out what to do here myself, as I have some typeclasses that for efficiency reasons it

[Haskell-cafe] type class design

2010-10-29 Thread Uwe Schmidt
Dear Haskellers, I've a question about type class design. When developing the set of functions for a class, there are often two or more functions, let's say f and g, where the semantics of g can be expressed by f. When writing down the code, there are two choices for g. First g is included in

Re: [Haskell-cafe] type class design

2010-10-29 Thread Tillmann Rendel
Hi, Uwe Schmidt wrote: In the standard Haskell classes we can find both cases, even within a single class. Eq with (==) as f and (/=) as g belongs to the 1. case Note that the case of (==) and (/=) is slightly different, because not only can (/=) be defined in terms (==), but also the other

Re: [Haskell-cafe] type class design

2010-10-29 Thread Ivan Lazar Miljenovic
On 29 October 2010 23:28, Uwe Schmidt u...@fh-wedel.de wrote: Dear Haskellers, I've a question about type class design. When developing the set of functions for a class, there are often two or more functions, let's say f and g, where the semantics of g can be expressed by f. When writing

Re: [Haskell-cafe] type class design

2010-10-29 Thread Ben Millwood
On Fri, Oct 29, 2010 at 1:33 PM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Note that the case of (==) and (/=) is slightly different, because not only can (/=) be defined in terms (==), but also the other way around. The default definitions of (==) and (/=) are mutually

Re: [Haskell-cafe] type class design

2010-10-29 Thread David Menendez
On Fri, Oct 29, 2010 at 8:33 AM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Hi, Uwe Schmidt wrote: In the standard Haskell classes we can find both cases, even within a single class. Eq with (==) as f and (/=) as g belongs to the 1. case Note that the case of (==) and (/=)