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
--| Lift a natural transformation from @f@ to @g@ into a natural transformation from @'Free' f@ to @'Free' g@.hoistFree::Functorg=> (foralla.fa->ga) ->Freefb->Freegb--| Lift a monad homomorphism from @m@ to @n@ into a monad homomorphism from @'FreeT' f m@ to @'FreeT' f n@---- @'hoistFreeT' :: ('Functor' m, 'Functor' f) => (m ~> n) -> 'FreeT' f m ~> 'FreeT' f n@hoistFreeT:: (Functorm, Functorf) => (foralla.ma->na) ->FreeTfmb->FreeTfnb--| Lift a natural transformation from @f@ to @g@ into a monad homomorphism from @'FreeT' f m@ to @'FreeT' g m@transFreeT:: (Monadm, Functorg) => (foralla.fa->ga) ->FreeTfmb->FreeTgmb
Both hoistFree and transFreeT correspond to lifting a natural transformation f ⇒ g to a monad homomorphism Free f ⇒ Free g, just like you'd lift a function a → b to a monoid homomorphism [a] → [b]. hoistFreeT is specific to monad transformers.
hoistFree should be deprecated and renamed to transFree, and its comment should mention that it lifts a natural transformation to a monad homomorphism.
Same thing with hoistF/hoistFT/transFT and possibly others.
The text was updated successfully, but these errors were encountered:
Both
hoistFree
andtransFreeT
correspond to lifting a natural transformationf ⇒ g
to a monad homomorphismFree f ⇒ Free g
, just like you'd lift a functiona → b
to a monoid homomorphism[a] → [b]
.hoistFreeT
is specific to monad transformers.hoistFree
should be deprecated and renamed totransFree
, and its comment should mention that it lifts a natural transformation to a monad homomorphism.Same thing with
hoistF
/hoistFT
/transFT
and possibly others.The text was updated successfully, but these errors were encountered: