[GHC] #11228: Interaction between ORF and record pattern synonyms needs to be resolved.

#11228: Interaction between ORF and record pattern synonyms needs to be resolved. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple PatternSynonyms, orf | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Currently the two extensions do not work well together. When defining a record pattern synonym all field names must be distinct even with the extension turned on. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11228 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11228: Interaction between ORF and record pattern synonyms needs to be resolved. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: | PatternSynonyms, 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 bgamari): * version: 7.10.3 => 7.11 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11228#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11228: Interaction between ORF and record pattern synonyms needs to be resolved. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: adamgundry Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: | PatternSynonyms, 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): * owner: => adamgundry * cc: agundry (removed) * cc: adamgundry (added) Comment: I'll try to take another look at this soon. (Sadly I didn't spot this ticket earlier, because I need to be CCd as `adamgundry` rather than `agundry`.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11228#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11228: Interaction between ORF and record pattern synonyms needs to be resolved. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: adamgundry Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: | PatternSynonyms, orf Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9975 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by adamgundry): * related: => #9975 Comment: It turns out that trying to make use of duplicate fields belonging to pattern synonyms triggers a `find_tycon` panic, similar to #9975. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11228#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11228: Interaction between ORF and record pattern synonyms needs to be resolved. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: | PatternSynonyms, orf Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9975, #11283 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by adamgundry): * owner: adamgundry => * related: #9975 => #9975, #11283 Comment: The panic was actually caused by the combination of pattern synonyms and `DisambiguateRecordFields` or `RecordWildCards`, without needing `DuplicateRecordFields`. See #11283. The more general question of the interaction of `DuplicateRecordFields` and record pattern synonyms looks like it will be rather intricate. At the moment, record pattern synonym constructors and fields are not distinguished by the `Avail` or `Parent` types, but constructors and fields will need to be handled differently. This will require significant refactoring. We need to track the pattern synonym to which a field belongs, so that we can disambiguate fields properly. This doesn't even require `DuplicateRecordFields`: merely using `DisambiguateRecordFields` fails when the constructor is a record pattern synonym. However, the pattern synonym isn't a "parent" for the field in the same way that a datatype is. And pattern synonyms have the added complexity of being able to be associated with arbitrary parent datatypes. In addition, once `DuplicateRecordFields` is involved we need to keep track of the `FieldLabelString` separately from the `Name` when representing fields (e.g. in `AvailTC` or `FldParent`). I'm not going to be able to address this in the near future. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11228#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11228: Interaction between ORF and record pattern synonyms needs to be resolved.
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Resolution: | Keywords:
| PatternSynonyms, orf
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #9975, #11283 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11228: Interaction between ORF and record pattern synonyms needs to be resolved. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: | PatternSynonyms, orf Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9975, #11283 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by akio): * cc: akio (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11228#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11228: Interaction between ORF and record pattern synonyms needs to be resolved. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: | PatternSynonyms, orf Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9975, #11283 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by gridaphobe): * cc: gridaphobe (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11228#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC