Re: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-15 Thread Brian Hulley
Meng Wang wrote: Hi Brian, Thank you for starting the thread. We (Martin Sulzmann and me) proposed a type class extension which allows modular extension of superclasses (a complement of subclass extension). The idea has been shown to be particularly useful in (but not limited to) encodings of ge

Re: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-14 Thread Meng Wang
Hi Brian, Thank you for starting the thread. We (Martin Sulzmann and me) proposed a type class extension which allows modular extension of superclasses (a complement of subclass extension). The idea has been shown to be particularly useful in (but not limited to) encodings of generic programm

Re: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-09 Thread Brian Hulley
Brian Hulley wrote: Simon Peyton-Jones wrote: One of the great things about John's class-alias proposal is that John worked out a lot of details and captured them in a web page, rather than it getting buried in an email thread. If you have ideas to refine his proposal, it'd be good to see if, w

Re: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-09 Thread Brian Hulley
Simon Peyton-Jones wrote: One of the great things about John's class-alias proposal is that John worked out a lot of details and captured them in a web page, rather than it getting buried in an email thread. If you have ideas to refine his proposal, it'd be good to see if, with him, you can come

RE: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-09 Thread Simon Peyton-Jones
al Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roberto | Zunino | Sent: 04 January 2007 22:44 | To: Brian Hulley | Cc: Haskell-cafe | Subject: Re: [Haskell-cafe] Redefining superclass default methods in a subclass | | Brian Hulley wrote: | > Hi, | > Looking at some

Re: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-06 Thread Brian Hulley
Bulat Ziganshin wrote: Hello Brian, Thursday, January 4, 2007, 10:00:05 PM, you wrote: deeper, the programmer is burdened more and more by the need to cut-and-paste method definitions between instances because Haskell doesn't allow a superclass (or ancestor class) method default to be redefine

Re: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-05 Thread Bulat Ziganshin
Hello Brian, Thursday, January 4, 2007, 10:00:05 PM, you wrote: > deeper, the programmer is burdened more and more by the need to > cut-and-paste method definitions between instances because Haskell doesn't > allow a superclass (or ancestor class) method default to be redefined in a > subclass.

Re: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-05 Thread Yitzchak Gale
Brian Hulley wrote: ...allow a superclass (or ancestor class) method default to be redefined in a subclass. This has been proposed several times over the years. I remember seeing Simon PJ propose it within the past year or two, I think. I personally have needed this on several occasions. So I

Re: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-04 Thread Brian Hulley
Roberto Zunino wrote: Brian Hulley wrote: because Haskell doesn't allow a superclass (or ancestor class) method default to be redefined in a subclass. How one would write instances? Using your Monad class, does instance Monad F where return = ... (>>=) = ... automatically define

Re: [Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-04 Thread Roberto Zunino
Brian Hulley wrote: Hi, Looking at some of the ideas in http://www.haskell.org/haskellwiki/The_Other_Prelude , it struck me that the class system at the moment suffers from the problem that as hierarchies get deeper, the programmer is burdened more and more by the need to cut-and-paste method

[Haskell-cafe] Redefining superclass default methods in a subclass

2007-01-04 Thread Brian Hulley
Hi, Looking at some of the ideas in http://www.haskell.org/haskellwiki/The_Other_Prelude , it struck me that the class system at the moment suffers from the problem that as hierarchies get deeper, the programmer is burdened more and more by the need to cut-and-paste method definitions between