
#13948: GHC incorrectly suggests a data constructor is in scope in 8.2 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1-rc2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Poor/confusing Unknown/Multiple | error message Test Case: | Blocked By: Blocking: | Related Tickets: #13568 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- After commit 343cb32d0983f576d344a2d04a35c3fd6eecf2c5 (the fix for #13568), which debuted in GHC 8.2, GHC thinks that out-of-scope identifiers are actually in-scope! {{{#!hs module Bug where f :: T f = undefined }}} In GHC 8.2.1-rc3, the error message is: {{{ $ /opt/ghc/8.2.1/bin/ghc Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) Bug.hs:3:6: error: Not in scope: type constructor or class âTâ A data constructor of that name is in scope; did you mean DataKinds? | 3 | f :: T | ^ }}} Compare this to GHC 8.0.2, which gives a more sensible error message: {{{ $ /opt/ghc/8.0.2/bin/ghc Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) Bug.hs:3:6: error: Not in scope: type constructor or class âTâ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13948 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler