Re: [Haskell-cafe] When to use fancy types [Re: NumberTheory library]

2005-05-12 Thread ajb
G'day all. Quoting Jan-Willem Maessen <[EMAIL PROTECTED]>: > Why not use a function? > > What's wrong with a function? > > There no need to go leaping for a multiparameter type class with a > functional dependency! Just use a function. > > [With apologies to John Cleese] A reasonable question,

[Haskell-cafe] ANNOUNCE: Haskell Communities & Activities Report (8th ed., May 2005)

2005-05-12 Thread Andres Loeh
On behalf of the many, many contributors, I am pleased to announce that the Haskell Communities and Activities Report (8th edition, May 2005) http://www.haskell.org/communities/ is now available from the Haskell Communities home page in severa

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-12 Thread Lennart Augustsson
Greg Buchholz wrote: Samuel Bronson wrote: The former may not be hard, but the latter would require functions with typeclass constraints on their types to be annotated in the interface file with what typeclass methods they called. Does that sound hard yet? Compared to writing the rest of the c

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-12 Thread Samuel Bronson
On 12/05/05, Greg Buchholz <[EMAIL PROTECTED]> wrote: > Samuel Bronson wrote: > > The former may not be hard, but the latter would require functions > > with typeclass constraints on their types to be annotated in the > > interface file with what typeclass methods they called. Does that > > sound h

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-12 Thread Greg Buchholz
Samuel Bronson wrote: > The former may not be hard, but the latter would require functions > with typeclass constraints on their types to be annotated in the > interface file with what typeclass methods they called. Does that > sound hard yet? Compared to writing the rest of the compiler? No.

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-12 Thread Samuel Bronson
On 12/05/05, Greg Buchholz <[EMAIL PROTECTED]> wrote: > Samuel Bronson wrote: > > After thinking about it for a while, I'm positive it would be a LOT of > > work to get that to work in general, if it is even possible. Even > > getting it to work in only specific, limited cases (such as within a > >

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-12 Thread Greg Buchholz
Samuel Bronson wrote: > After thinking about it for a while, I'm positive it would be a LOT of > work to get that to work in general, if it is even possible. Even > getting it to work in only specific, limited cases (such as within a > module) would probably not be easy, since it is such an indirec

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-12 Thread Samuel Bronson
On 12/05/05, Greg Buchholz <[EMAIL PROTECTED]> wrote: > Samuel Bronson wrote: > > Aren't the warnings just about as usefull as failures? Anyway, you > > could always use the -Werrror flag for ghc... > > > > In any case, I would not like to have to implement an entire typeclass > > at once... it wou

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-12 Thread Greg Buchholz
Samuel Bronson wrote: > Aren't the warnings just about as usefull as failures? Anyway, you > could always use the -Werrror flag for ghc... > > In any case, I would not like to have to implement an entire typeclass > at once... it would interfere with incremental development. Hmm. I guess I'm

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-12 Thread Samuel Bronson
On 12/05/05, Greg Buchholz <[EMAIL PROTECTED]> wrote: > Bernard Pope wrote: > > > > Perhaps this section of the report might help: > > > > >From Section "4.3.2 Instance Declarations" in the Haskell Report: > > > >http://www.haskell.org/onlinereport/decls.html#instance-decls > > > > "If no bindi

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-12 Thread Greg Buchholz
Bernard Pope wrote: > > Perhaps this section of the report might help: > > >From Section "4.3.2 Instance Declarations" in the Haskell Report: > >http://www.haskell.org/onlinereport/decls.html#instance-decls > > "If no binding is given for some class method then the corresponding > default c

Re: [Haskell-cafe] When to use fancy types [Re: NumberTheory library]

2005-05-12 Thread Lennart Augustsson
Thank you for saying what I was too lazy to say myself. :) -- Lennart Jan-Willem Maessen wrote: On May 10, 2005, at 4:14 AM, Bo Herlin wrote: > Well, part of what I was doing was experimenting with what a library like > this should look like, even more than what it should do. For some re

[Haskell-cafe] rank 2 polymorphism example

2005-05-12 Thread Scott J.
Hi,   can someone give me an example of an arbitrary rank polymorphism function?   Thanks Jan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] When to use fancy types [Re: NumberTheory library]

2005-05-12 Thread Jan-Willem Maessen
On May 10, 2005, at 4:14 AM, Bo Herlin wrote: > Well, part of what I was doing was experimenting with what a library like > this should look like, even more than what it should do. For some reason, > I kind of like writing this: > > *Math.Prime> is Prime 42 > False > > instead of this: >

Re: [Haskell-cafe] NumberTheory library

2005-05-12 Thread Bo Herlin
Hi I have put some comments and examples in the code now, and will continue to do so as soon as i get time for it. Please look at the code, and tell me if it is worth making into a part of an official library. Or, even better, if someone has already done this code, and in a better way. You fin