Skip to content

Commit

Permalink
Merge pull request #205 from fused-effects/🔥-deprecations
Browse files Browse the repository at this point in the history
🔥 deprecations
  • Loading branch information
robrix committed Sep 2, 2019
2 parents 8a82b66 + 75ee990 commit e7c916a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- Removes `Control.Effect.Random` (and the dependencies on `random` & `MonadRandom`) in favour of a new [`fused-effects-random` package](https://github.com/fused-effects/fused-effects-random) ([#200](https://github.com/fused-effects/fused-effects/pull/200)).

- Removes `fmap'` and `handlePure`, both deprecated in 0.5.0.0 ([#205](https://github.com/fused-effects/fused-effects/pull/205)).

# v0.5.0.1

- Adds support for ghc 8.8.1.
Expand Down
14 changes: 0 additions & 14 deletions src/Control/Effect/Carrier.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module Control.Effect.Carrier
, Effect(..)
, Carrier(..)
, send
, handlePure
, handleCoercible
-- * Generic deriving of 'HFunctor' & 'Effect' instances.
, GHFunctor(..)
Expand All @@ -24,11 +23,6 @@ import GHC.Generics
--
-- All effects must be 'HFunctor's.
class HFunctor h where
-- | Apply a handler specified as a natural transformation to both higher-order and continuation positions within an 'HFunctor'.
fmap' :: Functor (h f) => (a -> b) -> h f a -> h f b
fmap' = fmap
{-# INLINE fmap' #-}

-- | Higher-order functor map of a natural transformation over higher-order positions within the effect.
--
-- A definition for 'hmap' over first-order effects can be derived automatically provided a 'Generic1' instance is available.
Expand All @@ -37,8 +31,6 @@ class HFunctor h where
hmap f = to1 . ghmap f . from1
{-# INLINE hmap #-}

{-# DEPRECATED fmap' "fmap' has been subsumed by fmap." #-}

instance HFunctor Pure.Pure
instance (HFunctor f, HFunctor g) => HFunctor (f Sum.:+: g)

Expand Down Expand Up @@ -85,12 +77,6 @@ send = eff . Sum.inj
{-# INLINE send #-}


-- | Apply a handler specified as a natural transformation to both higher-order and continuation positions within an 'HFunctor'.
handlePure :: (HFunctor sig, Functor f) => (forall x . f x -> g x) -> sig f a -> sig g a
handlePure = hmap
{-# INLINE handlePure #-}
{-# DEPRECATED handlePure "handlePure has been subsumed by hmap." #-}

-- | Thread a 'Coercible' carrier through an 'HFunctor'.
--
-- This is applicable whenever @f@ is 'Coercible' to @g@, e.g. simple @newtype@s.
Expand Down

0 comments on commit e7c916a

Please sign in to comment.