You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lots of functions in pipes-network do not implement fusion.
Looking at the source files, it would be really clumsy (with lots of code duplication or strange naming and force inlines..) to try and implement them now, BUT I was talking with @Gabriel439 and maybe we can get a for' variant of for, which tells pipes automatic general fusion is safe, thus doing all the work for us.
The text was updated successfully, but these errors were encountered:
To clarify what @kvanberendonck means, the for rewrite rules are guaranteed to be true if the body of the loop does not request/await, so we could provide a Pipes.Internal version of for, which type restricts the second argument, like this:
for'::Monadm=>Proxyx'xb'bma'-> (b->ProxyXuc'cmb')
->Proxyx'xc'cma'
for' p f = p //> (closed \>\ f)
{-# RULES "for' p f" forall p f . p >-> for' cat f = for' p f #-}
I just need to make sure that fusion still fires if we use this approach because @kvanberendonck has identified some cases where pipes that are implemented in terms of fusible pipe are not triggering shortcut fusion.
Thank for mentioning this. I admit I haven't paid incredible attention to the recent discussions about pipes fusion, but I'd be happy to make the internals of pipes-network a bit uglier if that's what we need in order to guarantee pipes fusion. However, I'd rather wait for @Gabriel439's for' and see if that makes the trick.
Lots of functions in pipes-network do not implement fusion.
Looking at the source files, it would be really clumsy (with lots of code duplication or strange naming and force inlines..) to try and implement them now, BUT I was talking with @Gabriel439 and maybe we can get a
for'
variant offor
, which tells pipes automatic general fusion is safe, thus doing all the work for us.The text was updated successfully, but these errors were encountered: