id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
2641,Revise the rules for -XExtendedDeafultRules,simonpj,,"The `-XExtendedDefaultRules` flag is very liberal about type-class defaults. Perhaps too liberal:
{{{
> *Main> quickCheck (\xs -> reverse xs == xs)
> +++ OK, passed 100 tests.
}}}
Not good (reverse on lists is not the identity function). I expect a type error!  Reason: reverse on list of () is indeed the identity function!

[http://www.haskell.org/ghc/docs/latest/html/users_guide/interactive-evaluation.html#extended-default-rules The rules] are currently these:
 * All of the classes Ci are single-parameter type classes.
 * At least one of the classes Ci is numeric, or is Show, Eq, or Ord. 

Maybe we should tighten up the second rule to say: 
 * '''All''' of the classes Ci is numeric, or is Show, Eq, or Ord. 
Then the Quickcheck example would not bogusly succeed in typechecking, because there's an `Arbitrary` constraint involved.

This ticket is to record the idea and canvas opinion.  Record thoughts below.

See also 
 * #2853
 * #2854",feature request,new,lowest,7.6.2,Compiler,6.8.3,,,koen@… lennart@…,Unknown/Multiple,Unknown/Multiple,,Unknown,,,,
