[GHC] #13948: GHC incorrectly suggests a data constructor is in scope in 8.2

#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

#13948: GHC incorrectly suggests a data constructor is in scope in 8.2 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.1-rc2 Resolution: | 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): Phab:D3719 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D3719 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13948#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13948: GHC incorrectly suggests a data constructor is in scope in 8.2
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1-rc2
Resolution: | 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): Phab:D3719
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#13948: GHC incorrectly suggests a data constructor is in scope in 8.2 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1-rc2 Resolution: | 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): Phab:D3719 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge * milestone: => 8.2.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13948#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13948: GHC incorrectly suggests a data constructor is in scope in 8.2 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.2.1-rc2 Resolution: fixed | 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): Phab:D3719 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed * milestone: 8.2.2 => 8.2.1 Comment: Merged to `ghc-8.2` in fb46561900480b8d9659ab3e9f8590a9a38a69ea. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13948#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC