I need to check my understanding ...
1) both implementations
execU m = (lift m >> await) >~ cat
and the original one:
execU mOp = forever $ do
lift mOp
await >>= yield
are equivalent given the rewrite rules (at least with latest versions of
ghc that had the implementation of `forever` fixed)
2) Let's say the order doesn't matter (as it might be the case in the
linked code). Is it then better to use `mapM` to get the monadic action of
`execU` fused with the upstream producer ?
3) Is it necessary to add `INLINABLE` for `execU` to get the rewrite rules
to fire.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].