[GHC] #13438: ghci :browse does not work with DuplicateRecordFields

#13438: ghci :browse does not work with DuplicateRecordFields -------------------------------------+------------------------------------- Reporter: rik | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.2 Keywords: | Operating System: Unknown/Multiple duplicaterecordfields ghci | Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Using `:browse` on module which has enabled DuplicateRecordFields and datatypes are exported, does not return the field accessor functions. So for example: {{{#!hs data Login = Login { code :: Text , password :: Text } )}}} `browse` for module does not return `code` and `password` accessor functions. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13438 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13438: ghci :browse does not work with DuplicateRecordFields -------------------------------------+------------------------------------- Reporter: rik | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.2 Resolution: | Keywords: | duplicaterecordfields ghci Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by rik: Old description:
Using `:browse` on module which has enabled DuplicateRecordFields and datatypes are exported, does not return the field accessor functions.
So for example: {{{#!hs data Login = Login { code :: Text , password :: Text } )}}}
`browse` for module does not return `code` and `password` accessor functions.
New description: Using `:browse` on module which has enabled DuplicateRecordFields and datatypes are exported, does not return the field accessor functions. So for example: {{{#!hs data Login = Login { code :: Text , password :: Text } }}} `browse` for module does not return `code` and `password` accessor functions. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13438#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13438: ghci :browse does not work with DuplicateRecordFields -------------------------------------+------------------------------------- Reporter: rik | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.2 Resolution: | Keywords: | duplicaterecordfields ghci orf Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by adamgundry): * keywords: duplicaterecordfields ghci => duplicaterecordfields ghci orf * cc: adamgundry (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13438#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13438: ghci :browse does not work with DuplicateRecordFields -------------------------------------+------------------------------------- Reporter: rik | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.2 Resolution: | Keywords: | duplicaterecordfields ghci orf Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by adamgundry): I've taken an initial look at this. FWIW it seems I need `:browse!` to observe the difference. The problem is that `browseModule` uses `modInfoExports` or `modInfoTopLevelScope`, both of which omit record fields defined with `DuplicateRecordFields`. To change this `browseModule` needs to be modified to work with a mixture of `Name`s and `FieldLabel`s, which is a bit of pain. I'm thinking about how to redesign things to make this easier... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13438#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC