[GHC] #12529: Error message: visible type application of constructor/variable that is not in scope
GHC
ghc-devs at haskell.org
Wed Aug 24 14:30:46 UTC 2016
#12529: Error message: visible type application of constructor/variable that is not
in scope
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
TypeApplications |
Architecture: | Type of failure: Incorrect
Unknown/Multiple | warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
If I use an identifier not in scope:
{{{
$ ghci -ignore-dot-ghci
GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help
Prelude> p
<interactive>:1:1: error: Variable not in scope: p
Prelude> P
<interactive>:2:1: error: Data constructor not in scope: P
}}}
Using visible type application:
{{{
$ ghci -ignore-dot-ghci -XTypeApplications
GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help
Prelude> p @Int
<interactive>:1:1: error:
• Cannot apply expression of type ‘t0’
to a visible type argument ‘Int’
• In the expression: p @Int
In an equation for ‘it’: it = p @Int
Prelude> P @Int
<interactive>:2:1: error:
• Cannot apply expression of type ‘t0’
to a visible type argument ‘Int’
• In the expression: P @Int
In an equation for ‘it’: it = P @Int
}}}
I would prefer these error messages to be the same as the first two:
thoughts?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12529>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list