[Haskell-cafe] bug in ghci ?
chrisdone at googlemail.com
Thu Jul 8 09:57:59 EDT 2010
Hehe, seems like a -W-mutual-recursive-default-methods option is in order.
On 8 July 2010 15:47, Ivan Lazar Miljenovic <ivan.miljenovic at gmail.com> wrote:
> "Pasqualino \"Titto\" Assini" <tittoassini at 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
>> This problem has bitten me twice while trying to use automatic
>> derivation of a data type in another file.
>> In my innocence I wrote:
>> instance Show Test
>> rather than
>> deriving instance Show Test
>> I didn't notice the error as GHC seemed to be happy and then when I
>> tried to use it: BANG!
>> Very confusing.
>> I suppose that Haskell has spoiled me, if it compiles I assume that it
>> will work :-)
> As I said, there would be no error as all the methods have a definition
> (whether or not they make sense in this case is a different story); it
> will still successfully load a file if any methods don't have
> definitions but will provide a warning in those situations.
> Ivan Lazar Miljenovic
> Ivan.Miljenovic at gmail.com
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe