[GHC] #16375: TypeApplications obscure "Variable not in scope" error message

#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

#16375: TypeApplications obscure "Variable not in scope" error message -------------------------------------+------------------------------------- Reporter: roland | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13834 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13834 Comment: Closing as a duplicate of #13834. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16375#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC