
#9132: takeWhile&C. still not fusible
-------------------------------------+-------------------------------------
Reporter: Blaisorblade | Owner: skeuchel
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 7.8.2
Resolution: | Keywords: fusion
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: Runtime | Difficulty: Moderate (less
performance bug | than a day)
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+-------------------------------------
Comment (by Blaisorblade):
@nomeata: while @skeuchel is the owner, I'm the OP. Thanks for explaining
me why fusing `dropWhile` is important.
Was your comment addressed at the branch I posted, or is there some other
work from skeuchel? (I saw the [private communication] and didn't get it
either).
In case it is relevant, it seems to me harder to fuse dropWhile.
Writing dropWhile as a fold is harder (technically, because it is not a
catamorphism but a paramorphism). When the predicate fails, you want to
return the rest of the list without processing it, but the original list
is not available:
dropWhileF p c n x xs = if p x then xs else