File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ roll f = Bind (unsafeCoerce f) (unsafeCoerce (Leaf \a -> a))
35
35
suspend :: forall f a . Applicative f => Free f a -> Free f a
36
36
suspend = roll <<< pure
37
37
38
- hoistFree :: forall f g . (f ~> g ) -> Free f ~> Free g
39
- hoistFree nat = case _ of
38
+ hoist :: forall f g . (f ~> g ) -> Free f ~> Free g
39
+ hoist nat = case _ of
40
40
Pure a -> Pure a
41
41
Bind f k -> Bind (nat f) (Hoist (unsafeCoerce nat) (unsafeCoerce k))
42
42
@@ -78,7 +78,7 @@ resume pure' bind' = case _ of
78
78
79
79
go2 :: forall g x y . (UnsafeBoundF ~> g ) -> FreeBinds UnsafeBoundF x y -> x -> Free g y
80
80
go2 nat bs x = case bs of
81
- Leaf k -> hoistFree nat (k x)
81
+ Leaf k -> hoist nat (k x)
82
82
Node l r -> case uncons l r of
83
83
FreeCons k bs' -> case k x of
84
84
Pure a -> go2 nat bs' a
@@ -97,7 +97,7 @@ uncons = go1
97
97
98
98
go2 :: forall g a' b' x' . (UnsafeBoundF ~> g ) -> FreeBinds UnsafeBoundF a' x' -> FreeBinds g x' b' -> FreeCons g a' b'
99
99
go2 nat l r = case l of
100
- Leaf k -> FreeCons (hoistFree nat <$> unsafeCoerce k) (unsafeCoerce r)
100
+ Leaf k -> FreeCons (hoist nat <$> unsafeCoerce k) (unsafeCoerce r)
101
101
Node l' r' -> go2 nat l' (Node (Hoist nat (unsafeCoerce r')) (unsafeCoerce r))
102
102
Hoist nat' n -> go2 (nat <<< nat') n r
103
103
You can’t perform that action at this time.
0 commit comments