[GHC] #13545: Remove duplication between lookupSubBndrOcc and lookupExportChild
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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: -------------------------------------+------------------------------------- `lookupSubBndrOcc` is used in expressions such as `x { y = 5 }` to resolve field labels such as `y`. `lookupExportChild` is used in export lists such as `T(A, x)` to lookup `A` and `x`. They contain very similar logic but it is duplicated in two places which caused #13528. It should be easy to refactor them them to deduplicate the logic. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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): Sounds plausible.. are you volunteering Matthew? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: mpickering Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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 mpickering): * owner: (none) => mpickering Comment: Yes, and other refactorings around RnEnv. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: mpickering Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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 Ben Gamari <ben@…>): In [changeset:"fa5a73f0a86908da31ec72ce33d37a7a704a0600/ghc" fa5a73f0/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="fa5a73f0a86908da31ec72ce33d37a7a704a0600" Allow qualified names to be children in export lists When doing this I noticed a horrible amount of duplication between lookupSubBndrOcc and lookupExportChild (which I am responsible for). I opened #13545 to keep track of this. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13528 Differential Revision: https://phabricator.haskell.org/D3434 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: mpickering Type: task | Status: closed Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.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 bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.4.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: task | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.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 simonpj): * owner: mpickering => (none) * status: closed => new * resolution: fixed => Comment: The commit in comment:3 does not close this ticket. On the contrary, it was the reason for opening it. No? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: task | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.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 bgamari): Oh dear, yes, I misread. Apologies. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: mpickering Type: task | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.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 mpickering): * owner: (none) => mpickering -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: mpickering Type: task | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.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 mpickering): There is the slight complication that `lookupExportChild` runs after typechecking which means that it invokes typechecker lookup functions to resolve things to do with record pattern synonym selectors. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: mpickering Type: task | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.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 Matthew Pickering <matthewtpickering@…>): In [changeset:"a3873e8cdec8fc966e91ebe024808376a4077e2b/ghc" a3873e8/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="a3873e8cdec8fc966e91ebe024808376a4077e2b" RnEnv refactoring Summary: Lots of refactoring in RnEnv to reduce code duplication. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13545 Differential Revision: https://phabricator.haskell.org/D3507 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13545: Remove duplication between lookupSubBndrOcc and lookupExportChild -------------------------------------+------------------------------------- Reporter: mpickering | Owner: mpickering Type: task | Status: closed Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.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 mpickering): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13545#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC