[GHC] #14347: Top-level RecordWildCards no longer working.

#14347: Top-level RecordWildCards no longer working. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 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: -------------------------------------+------------------------------------- {{{#!hs $ ghc -fforce-recomp /tmp/Damn.hs /tmp/T.hs [1 of 2] Compiling Damn ( /tmp/Damn.hs, /tmp/Damn.o ) [2 of 2] Compiling T ( /tmp/T.hs, /tmp/T.o ) /tmp/T.hs:7:5: warning: [-Wmissing-fields] • Fields of ‘D.D’ not initialised: x, y • In the expression: D.D {..} In an equation for ‘d’: d = D.D {..} | 7 | d = D.D {..} | ^^^^^^^^ $ cat /tmp/Damn.hs /tmp/T.hs module Damn (D(..)) where data D = D { x :: Int, y :: () } {-# LANGUAGE RecordWildCards #-} module T where import qualified Damn as D d :: D.D d = D.D {..} x :: Int x = 7 y :: () y = () $ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.2.1 }}} Meanwhile on 8.0 {{{#!hs $ ghc -Wall -fforce-recomp /tmp/Damn.hs /tmp/T.hs [1 of 2] Compiling Damn ( /tmp/Damn.hs, /tmp/Damn.o ) [2 of 2] Compiling T ( /tmp/T.hs, /tmp/T.o ) $ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.0.2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14347 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14347: Top-level RecordWildCards no longer working. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Fuuzetsu): * Attachment "T.hs" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14347 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14347: Top-level RecordWildCards no longer working. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Fuuzetsu): * Attachment "Damn.hs" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14347 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14347: Top-level RecordWildCards no longer working. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: adamgundry (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14347#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14347: Top-level RecordWildCards no longer working.
-------------------------------------+-------------------------------------
Reporter: Fuuzetsu | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* cc: adamgundry (removed)
* cc: simonpj (added)
Comment:
Oh, it turns out this breakage was intentional! It was caused by commit
2f8cd14fe909a377b3e084a4f2ded83a0e6d44dd:
{{{
From 2f8cd14fe909a377b3e084a4f2ded83a0e6d44dd Mon Sep 17 00:00:00 2001
From: Simon Peyton Jones

#14347: Top-level RecordWildCards no longer working. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): OK so it looks as if I made this change just before the GHC proposals process kicked off. If you think it's desirable for record wildcards to fill-in with top- level, or even imported, bindings, I suggest you write a short proposal to advocate for it. That way we'll get some debate. However, the absence of documentation of this property is bad. I'll add a paragraph about that anyway; we can always modify it if the GHC proposals process agrees a change. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14347#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14347: Top-level RecordWildCards no longer working. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Fuuzetsu): I highly dislike {{{RecordWildCards}}} and find its usage at the top-level especially disgusting though I know some that would disagree. *Personally* I am happy to not have this mis-feature but would like to request that the change is documented in GHC docs in the section about the extension. If that's done, please feel free to close the ticket, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14347#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14347: Top-level RecordWildCards no longer working.
-------------------------------------+-------------------------------------
Reporter: Fuuzetsu | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#14347: Top-level RecordWildCards no longer working. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Fuuzetsu): I think we can close this? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14347#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14347: Top-level RecordWildCards no longer working. -------------------------------------+------------------------------------- Reporter: Fuuzetsu | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Fuuzetsu): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14347#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC