#3691: Error message doesn't mention necessary extension in warning
------------------------------------------------+---------------------------
Reporter: arsenm | Owner:
Type: feature request | Status: reopened
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.4
Resolution: | Keywords:
Difficulty: | Os:
Unknown/Multiple
Testcase: | Architecture:
Unknown/Multiple
Failure: Incorrect warning at compile-time |
------------------------------------------------+---------------------------
Comment (by simonpj):
OK. But the proposal is:
* If `ScopedTypeVariables` is ''off'', you get warnings in situations
where something different would happen if you switched it ''on''.
Specifically, in situations where you mention a type variable 'a' that
would be in scope from some outer binding if `ScopedTypeVariables` was on.
The main example is two comments above this one. Another would be
{{{
{-# LANGUAGE RankNTypes #-}
f :: forall a. <blah>
f x = ....(foo :: a -> a)...
}}}
Here the `forall a` would bring 'a' into scope if you had
`ScopedTypeVariables`, and hence you'd get a warning on the type signature
for `foo` because it mentions 'a'.
I don't understand how your (1) and (2) relate to this
proposed new behaviour. It just adds a new warning, and one that concerns
an extension that the user might never have heard of, so I think it's
arguable that any such warning might itself be confusing.
But it's the users who matter here. What do you think?
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3691#comment:5>
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