[GHC] #11328: Auto complete in ghci shows $sel:function:Type for DuplicateRecordFields fields

#11328: Auto complete in ghci shows $sel:function:Type for DuplicateRecordFields fields -------------------------------------+------------------------------------- Reporter: kolmodin | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc1 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: -------------------------------------+------------------------------------- Given a haskell file; {{{#!hs {-# LANGUAGE DuplicateRecordFields #-} -- t.hs data A = A { name :: String } data B = B { name :: String } }}} and in GHCi; {{{ ghci t.hs GHCi, version 8.1.20151231: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( tnum.hs, interpreted ) Ok, modules loaded: Main. *Main> <TAB> <TAB> ... $sel:name:A $sel:name:B ... }}} The records show up as `$sel:function:Type`, a function which you cannot refer to by name. Even if you enable `OverloadedLabels`, the `#labels` don't show up in the auto completion. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11328 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11328: Auto complete in ghci shows $sel:function:Type for DuplicateRecordFields fields -------------------------------------+------------------------------------- Reporter: kolmodin | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc1 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 hvr): I wonder if this is related to #11051 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11328#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11328: Auto complete in ghci shows $sel:function:Type for DuplicateRecordFields fields -------------------------------------+------------------------------------- Reporter: kolmodin | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1-rc1 Resolution: | Keywords: | DuplicateRecordFields 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 thomie): * cc: adamgundry (added) * keywords: => DuplicateRecordFields * milestone: 8.0.1 => 8.2.1 Comment: Replying to [comment:1 hvr]:
I wonder if this is related to #11051
That bug is fixed, but this one is still present. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11328#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11328: Auto complete in ghci shows $sel:function:Type for DuplicateRecordFields fields -------------------------------------+------------------------------------- Reporter: kolmodin | Owner: adamgundry Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1-rc1 Resolution: | Keywords: | DuplicateRecordFields, ORF 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 adamgundry): * keywords: DuplicateRecordFields => DuplicateRecordFields, ORF * owner: => adamgundry Comment: The `$sel`-prefixed things are the internal `Name`s of record fields in modules for which `DuplicateRecordFields` is enabled. I tried to catch all the places where they might show up in user-facing output, but it's not at all surprising that I've missed some. I'll take a look. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11328#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Even if you enable `OverloadedLabels`, the `#labels` don't show up in
#11328: Auto complete in ghci shows $sel:function:Type for DuplicateRecordFields fields -------------------------------------+------------------------------------- Reporter: kolmodin | Owner: adamgundry Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 8.0.1-rc1 Resolution: | Keywords: | DuplicateRecordFields, ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | ghci/should_run/T11328 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1870 Wiki Page: | -------------------------------------+------------------------------------- Changes (by adamgundry): * testcase: => ghci/should_run/T11328 * status: new => patch * differential: => Phab:D1870 * component: Compiler => GHCi * milestone: 8.2.1 => 8.0.1 Comment: Fortunately this one was an easy fix. I noticed that generated names (e.g. beginning with `$tc` or `$tr`) were turning up in the autocomplete after defining datatypes interactively, so I fixed that too. It's a tiny patch, so maybe worth backporting to 8.0.1? But the bug is fairly obscure, so not a disaster if that's too much trouble. the auto completion. I've not changed this; I think it's the correct behaviour. A `#label` is not an identifier, it's a separate syntactic form, and there's no obvious basis for auto-completing it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11328#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11328: Auto complete in ghci shows $sel:function:Type for DuplicateRecordFields
fields
-------------------------------------+-------------------------------------
Reporter: kolmodin | Owner: adamgundry
Type: bug | Status: patch
Priority: normal | Milestone: 8.0.1
Component: GHCi | Version: 8.0.1-rc1
Resolution: | Keywords:
| DuplicateRecordFields, ORF
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| ghci/should_run/T11328
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1870
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11328: Auto complete in ghci shows $sel:function:Type for DuplicateRecordFields fields -------------------------------------+------------------------------------- Reporter: kolmodin | Owner: adamgundry Type: bug | Status: merge Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 8.0.1-rc1 Resolution: | Keywords: | DuplicateRecordFields, ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | ghci/should_run/T11328 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1870 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11328#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11328: Auto complete in ghci shows $sel:function:Type for DuplicateRecordFields fields -------------------------------------+------------------------------------- Reporter: kolmodin | Owner: adamgundry Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 8.0.1-rc1 Resolution: fixed | Keywords: | DuplicateRecordFields, ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | ghci/should_run/T11328 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1870 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 670466039ac63a94af9e136212da8d511f02b935. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11328#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC