[GHC] #16375: TypeApplications obscure "Variable not in scope" error message
GHC
ghc-devs at haskell.org
Fri Mar 1 11:11:13 UTC 2019
#16375: TypeApplications obscure "Variable not in scope" error message
-------------------------------------+-------------------------------------
Reporter: roland | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Compiling
{{{#!hs
{-# LANGUAGE TypeApplications #-}
module Foo where
foo = bar @Int
}}}
gives
{{{
Foo.hs:5:7: error:
• Cannot apply expression of type ‘t1’
to a visible type argument ‘Int’
• In the expression: bar @Int
In an equation for ‘foo’: foo = bar @Int
}}}
instead of:
{{{
Foo.hs:5:7: error: Variable not in scope: bar
}}}
This makes a potential typo appear like a typing error (no pun intended).
If we delete `@Int`, the second message is given.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16375>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list