Skip to content

Commit

Permalink
Drop deprecated unfoldCofree (#124)
Browse files Browse the repository at this point in the history
* Drop deprecated unfoldCofree

* Add changelog entry
  • Loading branch information
JordanMartinez authored Mar 17, 2022
1 parent c7e482d commit bc1ce21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Notable changes to this project are documented in this file. The format is based
Breaking changes:
- Update project and deps to PureScript v0.15.0 (#123 by @JordanMartinez)
- Drop deprecated `MonadZero` instance (#122 by @JordanMartinez)
- Drop deprecated `unfoldCofree`; use `buildCofree` instead (#124 by @JordanMartinez)

New features:

Expand Down
12 changes: 0 additions & 12 deletions src/Control/Comonad/Cofree.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module Control.Comonad.Cofree
, head
, tail
, hoistCofree
, unfoldCofree
, buildCofree
, explore
, exploreM
Expand Down Expand Up @@ -61,17 +60,6 @@ tail (Cofree c) = snd (force c)
hoistCofree :: forall f g. Functor f => (f ~> g) -> Cofree f ~> Cofree g
hoistCofree nat (Cofree c) = Cofree (map (nat <<< map (hoistCofree nat)) <$> c)

-- | This signature is deprecated and will be replaced by `buildCofree` in a
-- | future release.
unfoldCofree
:: forall f s a
. Functor f
=> (s -> a)
-> (s -> f s)
-> s
-> Cofree f a
unfoldCofree e n = buildCofree (\s -> Tuple (e s) (n s))

-- | Recursively unfolds a `Cofree` structure given a seed.
buildCofree
:: forall f s a
Expand Down

0 comments on commit bc1ce21

Please sign in to comment.