[GHC] #14684: combineIdenticalAlts is only partially implemented
GHC
ghc-devs at haskell.org
Wed Apr 4 21:49:12 UTC 2018
#14684: combineIdenticalAlts is only partially implemented
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner: sjakobi
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.2.2
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:D4542
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by sjakobi):
Replying to [comment:13 simonpj]:
Expanding the `DEFAULT` case before recombining the alts is an interesting
idea. I'm wondering though if we'd recreate alts that may have been
excluded (by the programmer or optimization steps) based on information
that isn't available in `CSE`. At worst we'd still just recreate the same
`DEFAULT` alt, so I believe no pessimisation is possible.
The design I currently have in mind involves largely imitating
`SimplUtils.prepareAlts` to
1. detect which constructors are impossible and should not be considered
when expanding the `DEFAULT`.
2. use a variant of `refineDefaultAlt` to expand the `DEFAULT` alt into
alts using the remaining possible constructors.
Does this sound right?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14684#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list