[GHC] #12092: Out-of-scope variable leads to type error, not scope error
GHC
ghc-devs at haskell.org
Sat May 26 14:05:39 UTC 2018
#12092: Out-of-scope variable leads to type error, not scope error
-------------------------------------+-------------------------------------
Reporter: kwf | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.1
checker) | Keywords:
Resolution: fixed | TypeApplications
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: #13834 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* status: new => closed
* keywords: => TypeApplications
* resolution: => fixed
* related: => #13834
Comment:
In GHC 8.4, you do in fact get a "Variable not in scope" error:
{{{
Bug.hs:5:7: error:
• Variable not in scope: spam
• Perhaps you meant ‘span’ (imported from Prelude)
|
5 | huh = spam @Int
| ^^^^
Bug.hs:5:7: error:
• Cannot apply expression of type ‘t1’
to a visible type argument ‘Int’
• In the expression: spam @Int
In an equation for ‘huh’: huh = spam @Int
|
5 | huh = spam @Int
| ^^^^^^^^^
}}}
Of course, there's still the issue that the second part of the error
message still appears. But that is the subject of #13834, so I'll close
this ticket in favor of that one.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12092#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list