Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃敟 deprecations #205

Merged
merged 4 commits into from
Sep 2, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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