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

2005-05-14 Thread Bulat Ziganshin
Hello Greg, Friday, May 13, 2005, 12:47:54 AM, you wrote: GB> 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

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] resolving missing class instances @ compile time

2005-05-04 Thread Bernard Pope
On Wed, 2005-05-04 at 17:18 -0700, Greg Buchholz wrote: > Here's a little quirk I ran into recently. While making a little > vector data type in class Num (code below), I didn't implement an > instance of "fromInteger" (thinking I didn't need it). Well as you can > probably guess, it turns ou

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

2005-05-04 Thread Greg Buchholz
Here's a little quirk I ran into recently. While making a little vector data type in class Num (code below), I didn't implement an instance of "fromInteger" (thinking I didn't need it). Well as you can probably guess, it turns out I did need it, and subsequently got a run time exception. Wh