#2641: Make -XExtendedDeafultRules a bit less liberal
------------------------------+---------------------------------------------
 Reporter:  simonpj           |          Owner:                  
     Type:  feature request   |         Status:  new             
 Priority:  normal            |      Milestone:  6.12 branch     
Component:  Compiler          |        Version:  6.8.3           
 Severity:  normal            |     Resolution:                  
 Keywords:                    |     Difficulty:  Unknown         
 Testcase:                    |   Architecture:  Unknown/Multiple
       Os:  Unknown/Multiple  |  
------------------------------+---------------------------------------------
Changes (by igloo):

  * milestone:  => 6.12 branch

Comment:

 A couple of thoughts:

 `-Wall` would warn about the defaulting. Perhaps in GHCi we could have a
 quieter warning on by default, so instead of either
 {{{
 <interactive>:1:35:
     Warning: Defaulting the following constraint(s) to type `()'
              `Eq a' arising from a use of `==' at <interactive>:1:35-50
              `Test.QuickCheck.Arbitrary a'
                arising from a use of `Test.QuickCheck.quickCheck'
                             at <interactive>:1:0-51
              `Show a'
                arising from a use of `Test.QuickCheck.quickCheck'
                             at <interactive>:1:0-51
     In the expression: reverse xs == xs
     In the first argument of `Test.QuickCheck.quickCheck', namely
         `(\ xs -> reverse xs == xs)'
     In a stmt of a 'do' expression:
         it <- Test.QuickCheck.quickCheck (\ xs -> reverse xs == xs)
 }}}
 or nothing we could get
 {{{
 Warning: Defaulting a type to ()
 }}}
 or
 {{{
 Warning: Defaulting a type to ()  (use -fwarn-whatever-it-is for more
 detail)
 }}}

 The other thought is getting very ad-hoc, but I think we only want
 defaulting to `()` in an `IO a` type.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2641#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to