Re: [Haskell-cafe] bug in ghci ?

2010-07-09 Thread Kevin Quick
On Thu, 08 Jul 2010 09:48:34 -0700, Daniel Fischer daniel.is.fisc...@web.de wrote: On Thursday 08 July 2010 18:24:05, Ben Millwood wrote: On Thu, Jul 8, 2010 at 3:45 PM, Daniel Fischer daniel.is.fisc...@web.de wrote: Well, I made the suggestion of emitting a warning on instance

Re: [Haskell-cafe] bug in ghci ?

2010-07-09 Thread Ivan Lazar Miljenovic
Kevin Quick qu...@sparq.org writes: I would think that only mutually recursive default methods would require respecification and that there could be any number of default methods that were reasonable as is. Since it's probably quite difficult for the Haskell compiler to analytically detect

Re: [Haskell-cafe] bug in ghci ?

2010-07-09 Thread Kevin Quick
On Fri, 09 Jul 2010 16:26:13 -0700, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Kevin Quick qu...@sparq.org writes: I would think that only mutually recursive default methods would require respecification and that there could be any number of default methods that were reasonable

Re: [Haskell-cafe] bug in ghci ?

2010-07-09 Thread Edward Kmett
On Fri, Jul 9, 2010 at 8:46 PM, Kevin Quick qu...@sparq.org wrote: On Fri, 09 Jul 2010 16:26:13 -0700, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Kevin Quick qu...@sparq.org writes: I would think that only mutually recursive default methods would require respecification and

Re: [Haskell-cafe] bug in ghci ?

2010-07-09 Thread Alexander Solla
On Jul 9, 2010, at 5:46 PM, Kevin Quick wrote: That's probably an interesting assertion that one of the category theorists around here could prove or disprove. ;-) It's not too hard. I don't like thinking about it in terms of category theory, though. It's easier to think about it in

Re: [Haskell-cafe] bug in ghci ?

2010-07-09 Thread Kevin Quick
On Fri, 09 Jul 2010 18:57:34 -0700, Edward Kmett ekm...@gmail.com wrote: I hope the above demonstrate that there are at least some fairly reasonable (and, given your request, appropriately category theoretic!) examples where one would want the ability to specify that there is more than one

[Haskell-cafe] bug in ghci ?

2010-07-08 Thread Pasqualino Titto Assini
Hi, I just noticed that in ghci: data Test = Test String instance Show Test show $ Test Hello Will result in infinite recursion. Is this a known bug? Thanks, titto ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Daniel Fischer
On Thursday 08 July 2010 15:20:13, Pasqualino Titto Assini wrote: Hi, I just noticed that in ghci: data Test = Test String instance Show Test show $ Test Hello Will result in infinite recursion. Is this a known bug? It's not a bug. There are default methods in Show for show in

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Marc Weber
Hi titto, You should try to give a complete list of steps which can be run to reproduce your problem. This also includes ghci --version output and maybe some info about the OS you're working on. So how you you load the code into ghci? Using ghci File.hs or :l ? In any case you want to declare

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Pasqualino Titto Assini
Thanks for the explanation. What I meant is not that is a bug that it recurses but rather the fact that the compiler will accept this incomplete definition without complaining. This problem has bitten me twice while trying to use automatic derivation of a data type in another file. In my

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Ivan Lazar Miljenovic
Pasqualino \Titto\ Assini tittoass...@gmail.com writes: Hi, I just noticed that in ghci: data Test = Test String instance Show Test show $ Test Hello Well, for starters you specify such a thing in ghci, so presumably you loaded a file with these definitions. Will result in infinite

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Ivan Lazar Miljenovic
Pasqualino \Titto\ Assini tittoass...@gmail.com writes: Thanks for the explanation. What I meant is not that is a bug that it recurses but rather the fact that the compiler will accept this incomplete definition without complaining. This problem has bitten me twice while trying to use

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Christopher Done
Hehe, seems like a -W-mutual-recursive-default-methods option is in order. On 8 July 2010 15:47, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Pasqualino \Titto\ Assini tittoass...@gmail.com writes: Thanks for the explanation. What I meant is not that is a bug that it recurses but

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Pasqualino Titto Assini
Well the problem is that no warnings are generated. If you have a class with some methods that do not have a default implementation and you do not provide them when defining your instance, GHC will at least politely complain. Ideally, GHC would detect that a Show instance requires one of its two

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Ivan Lazar Miljenovic
Pasqualino \Titto\ Assini tittoass...@gmail.com writes: Well the problem is that no warnings are generated. If you have a class with some methods that do not have a default implementation and you do not provide them when defining your instance, GHC will at least politely complain. Ideally,

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Pasqualino Titto Assini
On 8 July 2010 15:11, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: So you're volunteering to write such functionality? :p No ! I will patiently wait for the Simons' Dream Team to fix that and in the meantime I will live with the realisation that, having been kicked out of Eden, there

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Daniel Fischer
On Thursday 08 July 2010 16:11:58, Ivan Lazar Miljenovic wrote: Pasqualino \Titto\ Assini tittoass...@gmail.com writes: Well the problem is that no warnings are generated. If you have a class with some methods that do not have a default implementation and you do not provide them when

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Ben Millwood
On Thu, Jul 8, 2010 at 3:45 PM, Daniel Fischer daniel.is.fisc...@web.de wrote: Well, I made the suggestion of emitting a warning on instance declarations without method definitions. That would be comparatively easy to implement (even with an additional check to only emit the warning if the

Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Daniel Fischer
On Thursday 08 July 2010 18:24:05, Ben Millwood wrote: On Thu, Jul 8, 2010 at 3:45 PM, Daniel Fischer daniel.is.fisc...@web.de wrote: Well, I made the suggestion of emitting a warning on instance declarations without method definitions. That would be comparatively easy to implement (even

[Haskell-cafe] Bug in GHCi?

2007-08-08 Thread Dusan Kolar
Hello all, Maybe this is a wrong place to report, but I have repeatedly performed funny calculation in GHCi with strange time report. The version of GHCi is: ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___|