#3696: Incorrect type inferred with -fwarn-missing-signatures and a type class
------------------------------------------------+---------------------------
Reporter: spl | Owner:
Type: bug | Status: closed
Priority: low | Milestone: 7.0.1
Component: Compiler (Type checker) | Version: 6.10.1
Resolution: fixed | Keywords:
Testcase: typecheck/should_compila/T3696 | Blockedby:
Difficulty: | Os:
Unknown/Multiple
Blocking: | Architecture:
Unknown/Multiple
Failure: Incorrect warning at compile-time |
------------------------------------------------+---------------------------
Changes (by simonpj):
* status: new => closed
* testcase: => typecheck/should_compila/T3696
* resolution: => fixed
Comment:
Finally fixed by
{{{
Sun Sep 19 16:33:27 GMT Daylight Time 2010 [email protected]
* Add a flag -fwarn-missing-local-sigs, and improve -fwarn-mising-
signatures
The new flag prints out a warning if you have a local,
polymorphic binding that lacks a type signature. It's meant
to help with the transition to the new typechecker, which
discourages local let-generalisation.
At the same time I moved the missing-signature code to TcHsSyn,
where it takes place as part of zonking. That way the
types are reported after all typechecking is complete,
thereby fixing Trac #3696. (It's even more important for
local bindings, which is why I made the change.)
M ./compiler/hsSyn/HsBinds.lhs +7
M ./compiler/main/DynFlags.hs +2
M ./compiler/typecheck/TcBinds.lhs -39
M ./compiler/typecheck/TcHsSyn.lhs -41 +102
M ./compiler/typecheck/TcRnDriver.lhs -19 +26
M ./compiler/typecheck/TcRnMonad.lhs +1
M ./compiler/typecheck/TcRnTypes.lhs +1
}}}
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3696#comment:4>
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