[GHC] #13689: Data.Either doesn't export INLINABLE short functions like "rights"
GHC
ghc-devs at haskell.org
Fri May 12 15:34:46 UTC 2017
#13689: Data.Either doesn't export INLINABLE short functions like "rights"
-------------------------------------+-------------------------------------
Reporter: varosi | Owner: (none)
Type: bug | Status: infoneeded
Priority: normal | Milestone:
Component: Core Libraries | Version: 8.0.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect API | Unknown/Multiple
annotation | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by nomeata):
`INLINEABLE` might be reasonable. Isn’t it the case that the unfolding
stored in the interface will be the un-optimized one (i.e. not the large
thing visible up there?)
Or is the large code directly the result of the desugared list
comprehension (instead of applying rules to the resulting code)?
> Yes, we could give lefts and rights the same treatment that we give
filter and give it a "naive" definition, alongside some fusible
definitions with rules to map one to the other, but I think this is a lot
of complexity for little pay-off.
Probably not worth it. `lefts` and `rights` are already defined in terms
of fusable things (list comprehensions) – this is different for `filter`,
which has a recursive definition.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13689#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list