request for reviews for my first patch -- ticket 7401
eir at cis.upenn.edu
Mon Aug 12 04:14:50 CEST 2013
Maybe it's best if Show, Ord, etc., echo the new behavior for Eq, if EmmptyDataDecls is specified. The reason for the check in cond_stdOK is to make sure that we're conforming to the Haskell standard. But, if the user has specified EmptyDataDecls, then we're not bound to that requirement anymore. So, to me, it seems reasonable that the "null data_cons" check should be omitted for any class if EmptyDataDecls is specified.
What do others think? This would go beyond the scope of the particular reported bug, but it seems to make sense to me.
On Aug 9, 2013, at 3:16 PM, Ömer Sinan Ağacan wrote:
> Removing `null data_cons`(compiler/typecheck/TcDeriv.lhs 1105) check
> for eq instance declarations fixes this, code generation part would be
> same(changes in TcGenDeriv.hs were wrong and TcGenDeriv needs to be
> unchanged)but I'm not sure how to remove that check only for eq
> instance(Show, Ord, etc. sould still fail with same error message and
> they're checked by same function, `cond_stdOK` -- line 1053).
> Ömer Sinan Ağacan
> ghc-devs mailing list
> ghc-devs at haskell.org
More information about the ghc-devs