#1308: Type signature in warning is wrong
-------------------------+--------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.7
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Windows | Testcase:
Architecture: Unknown |
-------------------------+--------------------------------------------------
Comment (by simonpj):
Not obviously. `autoChart` falls under the Dreaded Monomorphism
Restriction, so its inferred type is ''not'' `forall t. Monad t => ...`.
It's not obvious what to report here. I originally added a remark to
highlight the MR point. Would that help? Something like:
{{{
Warning: Definition but no type signature for `autoChart'
Inferred type: autoChart :: t View
NB: autoChart is monomorphic in type variable t
}}}
In Trac #1256 Isaac wants to omit the `forall` in the displayed inferred
type; but that would mean there was no way to distinguish `autoChart :: t
View` from `autoChard :: forall t. t View`, which is presumably the way
Lennart read it.
Advice welcome. The issue is what is most comprehensible; implementing it
is probably easy!
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1308>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs