[GHC] #14544: doCorePass has at least one missing case
#14544: doCorePass has at least one missing case -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: newcomer | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- There is a catch all at the end of `doCorePass` which hides the fact that `doCorePass` should be total. In particular `doCorePass` is not implemented for `CoreOccurAnal` and so either `CoreOccurAnal` should be removed from `CoreToDo` or implemented properly in `doCorePass`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14544> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14544: doCorePass has at least one missing case -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: newcomer 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 sjakobi): There are more missing cases: `CoreDesugar`, `CoreDesugarOpt`, `CoreTidy`, `CorePrep`, and – depending on CPP – `CoreDoPluginPass`. Deleting the `CoreOccurAnal` constructor would be easy, but the other ones are actually in use. A first step might be to expand the catch-all to make sure that additional constructors aren't forgotten in the same way. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14544#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14544: doCorePass has at least one missing case -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4435 Wiki Page: | -------------------------------------+------------------------------------- Changes (by sjakobi): * differential: => Phab:D4435 Comment: Replying to [comment:1 sjakobi]:
A first step might be to expand the catch-all to make sure that additional constructors aren't forgotten in the same way.
Addressed in the attached Diff. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14544#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14544: doCorePass has at least one missing case -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4435 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"44ba60fe9bce298cfa41c4505d029c1a2c6e5671/ghc" 44ba60fe/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="44ba60fe9bce298cfa41c4505d029c1a2c6e5671" doCorePass: Expand catch-all This doesn't remedy problem, but at least it's more explicit than the catch-all Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14544 Differential Revision: https://phabricator.haskell.org/D4435 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14544#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14544: doCorePass has at least one missing case -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4435 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.6.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14544#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC