Skip to content

Commit 489144b

Browse files
committed
hoistFree in terms of substFree
1 parent 2dc730a commit 489144b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Control/Monad/Free.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ suspendF f = fromView (Bind (unsafeCoerceF (pure f)) unsafeCoerceVal)
9191
-- | Use a natural transformation to change the generating type constructor of a
9292
-- | free monad.
9393
hoistFree :: forall f g. (f ~> g) -> Free f ~> Free g
94-
hoistFree k = foldFree (liftF <<< k)
94+
hoistFree k = substFree (liftF <<< k)
9595

9696
-- | Embed computations in one `Free` monad as computations in the `Free` monad
9797
-- | for a coproduct type constructor.

0 commit comments

Comments
 (0)