[GHC] #9437: Wrong error message when using `..' with a record update
#9437: Wrong error message when using `..' with a record update -------------------------------------+------------------------------------- Reporter: elliottt | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Using `..' inside of a record update should report that it's an error to do so, but instead reports that it's an empty update. Consider this module: {{{ {-# LANGUAGE RecordWildCards #-} module Test where data Foo = Foo { x :: Int } test :: Foo -> Foo test foo = foo { .. } }}} When loaded, it complains about the empty record update of `foo`, instead of complaining about `..' being used during an update. {{{ GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Test ( test.hs, interpreted ) test.hs:8:16: Empty record update of: foo Failed, modules loaded: none. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9437> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9437: Wrong error message when using `..' with a record update -------------------------------------+------------------------------------- Reporter: elliottt | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"06600e74444d22caff1fa8c7eef0e4e2debd60b9/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="06600e74444d22caff1fa8c7eef0e4e2debd60b9" Two buglets in record wild-cards (Trac #9436 and #9437) of named fields, whereas the code in RnPat.rnHsRecFields is much better set up to do so. Both easily fixed. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9437#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9437: Wrong error message when using `..' with a record update -------------------------------------+------------------------------------- Reporter: elliottt | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: Thanks for reporting this. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9437#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9437: Wrong error message when using `..' with a record update -------------------------------------+------------------------------------- Reporter: elliottt | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | rename/should_fail/T9437 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => rename/should_fail/T9437 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9437#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9437: Wrong error message when using `..' with a record update -------------------------------------+------------------------------------- Reporter: elliottt | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | rename/should_fail/T9437 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"67a6ade91b77fb2252ebdad34a934d9fb54eb43d/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="67a6ade91b77fb2252ebdad34a934d9fb54eb43d" Improve documentation of record wildcards In particular mention that they aren't allowed for record updates. Triggered by Trac #9437 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9437#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC