[GHC] #12092: Wrong error message with TypeApplications
GHC
ghc-devs at haskell.org
Fri May 20 16:04:14 UTC 2016
#12092: Wrong error message with TypeApplications
-------------------------------------+-------------------------------------
Reporter: kwf | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
(Type checker) |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect
Unknown/Multiple | warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
When I write the following:
{{{#!hs
{-# language TypeApplications #-}
module Bug where
huh = spam @Int
}}}
I expect to get the error:
{{{
• Variable not in scope: spam
• Perhaps you meant ‘span’ (imported from Prelude)
}}}
But instead, I get the error:
{{{
• Cannot apply expression of type ‘t0’
to a visible type argument ‘Int’
• In the expression: spam @Int
In an equation for ‘huh’: huh = spam @Int
}}}
While it is //technically// true that I cannot apply an out-of-scope
identifier to a visible type argument, this is probably the less useful
error to receive.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12092>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list