Re: defaults

2007-01-16 Thread Malcolm Wallace
Simon Marlow <[EMAIL PROTECTED]> wrote: > >> If so, then I offer a counter example: > >> toRational pi > > > > If these two points are valid, then I think the slight loss > > of backward compatibility is acceptable? > > I spotted the problem because it > looks (to me) like the current Haskell

RE: defaults

2007-01-16 Thread Simon Marlow
[EMAIL PROTECTED] wrote: > Simon Marlow <[EMAIL PROTECTED]> wrote: > >> Is your proposal supposed to be backwards compatible with Haskell 98 >> for programs that don't have default declarations? > > Yes, it is supposed to be backwards compatible. > >> If so, then I offer a counter example: >> t

Re: defaults

2007-01-15 Thread Malcolm Wallace
Simon Marlow <[EMAIL PROTECTED]> wrote: > Is your proposal supposed to be backwards compatible with Haskell 98 > for programs that don't have default declarations? Yes, it is supposed to be backwards compatible. > If so, then I offer a counter example: > toRational pi > will default pi to Do

RE: defaults

2007-01-04 Thread Simon Marlow
[EMAIL PROTECTED] wrote: > Simon Peyton-Jones <[EMAIL PROTECTED]> writes: > >>> My suggestion is that there should be a single default type >>> per class. >> >> Ah, I missed that. > > I suppose, because the proposed new rule is so simple and short, it is > rather easy to miss its implications, espe

Re: defaults

2006-11-30 Thread Cale Gibbard
On 27/11/06, Ian Lynagh <[EMAIL PROTECTED]> wrote: On Mon, Nov 20, 2006 at 12:05:46PM +, Malcolm Wallace wrote: > Prompted by recent discussion on the Hat mailing list about the problems > of type-defaulting, I have added two new proposals for this issue to the > Haskell-prime wiki at: > >

Re: defaults

2006-11-29 Thread Duncan Coutts
On Thu, 2006-11-30 at 12:21 +1100, Bernie Pope wrote: > A compromise is to turn defaulting off "by default". This would mean > that if you want defaulting you have to ask for it. The question then > would be: > does defaulting get exported across module boundaries? I would be > inclined to say

Re: defaults

2006-11-29 Thread Bernie Pope
On 30/11/2006, at 5:08 AM, Malcolm Wallace wrote: Bernie Pope <[EMAIL PROTECTED]> wrote: I don't see a proposal to remove defaulting defaulting altogether on that page - has that been discussed already? Defaulting is one wart I would be glad to be rid of. I would also be happy if it was re

Re: defaults

2006-11-29 Thread Ross Paterson
On Wed, Nov 29, 2006 at 06:08:14PM +, Malcolm Wallace wrote: > Unfortunately, I suspect that teaching is _the_ major use-case for > defaulting. Imagine, day one, lesson one, a student types > > Prelude> 1+2 > > into Hugs, and gets the response > > Unresolved overloading: Num a > >

Re: defaults

2006-11-29 Thread Malcolm Wallace
Bernie Pope <[EMAIL PROTECTED]> wrote: > > I don't see a proposal to remove defaulting defaulting altogether on > > that page - has that been discussed already? > > > > Defaulting is one wart I would be glad to be rid of. > > I would also be happy if it was removed. Me too, in some ways. But...

Re: defaults

2006-11-27 Thread Bernie Pope
On 28/11/2006, at 11:28 AM, Ian Lynagh wrote: On Mon, Nov 20, 2006 at 12:05:46PM +, Malcolm Wallace wrote: Prompted by recent discussion on the Hat mailing list about the problems of type-defaulting, I have added two new proposals for this issue to the Haskell-prime wiki at: http:

Re: defaults

2006-11-27 Thread Duncan Coutts
On Mon, 2006-11-20 at 12:05 +, Malcolm Wallace wrote: > Prompted by recent discussion on the Hat mailing list about the problems > of type-defaulting, I have added two new proposals for this issue to the > Haskell-prime wiki at: > > http://hackage.haskell.org/trac/haskell-prime/wiki/Defaul

Re: defaults

2006-11-27 Thread Ian Lynagh
On Mon, Nov 20, 2006 at 12:05:46PM +, Malcolm Wallace wrote: > Prompted by recent discussion on the Hat mailing list about the problems > of type-defaulting, I have added two new proposals for this issue to the > Haskell-prime wiki at: > > http://hackage.haskell.org/trac/haskell-prime/wiki

Re: Defaults for superclass methods

2006-04-14 Thread Cale Gibbard
On 14/04/06, Dave Menendez <[EMAIL PROTECTED]> wrote: > The tricky part is dealing with multiple subclasses. > > For example, > > class Functor f where > fmap :: (a -> b) -> f a -> f b > > class Functor f => Monad f where > ... > fmap = liftM > > class Functor f

Re: Defaults for superclass methods

2006-04-13 Thread Dave Menendez
John Meacham writes: > On Tue, Apr 11, 2006 at 11:35:09AM +0100, Simon Marlow wrote: > > On 11 April 2006 11:08, Ross Paterson wrote: > > > > > On Tue, Apr 11, 2006 at 11:03:22AM +0100, Simon Marlow wrote: > > >> This is a rather useful extension, and as far as I can tell it > > >> doesn't have a

Re: Defaults for superclass methods

2006-04-13 Thread Ashley Yakeley
Simon Marlow wrote: If it's not clear which is the right way to go, then yes I guess that does rule it out. Could you summarise the proposals? If there was a clear winner, and it was easy enough to implement, perhaps we can knock up a prototype in time. The reason being I just hit a case wher

Re: Defaults for superclass methods

2006-04-11 Thread John Meacham
On Tue, Apr 11, 2006 at 11:35:09AM +0100, Simon Marlow wrote: > On 11 April 2006 11:08, Ross Paterson wrote: > > > On Tue, Apr 11, 2006 at 11:03:22AM +0100, Simon Marlow wrote: > >> This is a rather useful extension, and as far as I can tell it > >> doesn't have a ticket yet: > >> > >> http://

RE: Defaults for superclass methods

2006-04-11 Thread Simon Marlow
On 11 April 2006 11:08, Ross Paterson wrote: > On Tue, Apr 11, 2006 at 11:03:22AM +0100, Simon Marlow wrote: >> This is a rather useful extension, and as far as I can tell it >> doesn't have a ticket yet: >> >> http://www.haskell.org//pipermail/libraries/2005-March/003494.html >> >> should I

Re: Defaults for superclass methods

2006-04-11 Thread Ross Paterson
On Tue, Apr 11, 2006 at 11:03:22AM +0100, Simon Marlow wrote: > This is a rather useful extension, and as far as I can tell it doesn't > have a ticket yet: > > http://www.haskell.org//pipermail/libraries/2005-March/003494.html > > should I create a ticket? Is there any reason it might be hard