"Pasqualino \"Titto\" Assini" <[email protected]> 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 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 [email protected] IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
