linear-base-0.4.0: Standard library for linear types.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Functor.Linear

Description

The control functor hierarchy

The functors in this module are called control functors, which are different from the data functors in Data.Functor.Linear.

This distinction and the use-cases of each group of functors is explained in this blog post.

Synopsis

Control functor hierarchy

class Functor f => Functor f where Source #

Control linear functors. The functor of type f a holds only one value of type a and represents a computation producing an a with an effect. All control functors are data functors, but not all data functors are control functors.

Methods

fmap :: (a %1 -> b) %1 -> f a %1 -> f b Source #

Map a linear function g over a control functor f a. Note that g is used linearly over the single a in f a.

Instances

Instances details
Functor Identity Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a %1 -> b) %1 -> Identity a %1 -> Identity b Source #

Functor Par1 Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a %1 -> b) %1 -> Par1 a %1 -> Par1 b Source #

Functor IO Source # 
Instance details

Defined in System.IO.Linear

Methods

fmap :: (a %1 -> b) %1 -> IO a %1 -> IO b Source #

Functor RIO Source # 
Instance details

Defined in System.IO.Resource.Linear.Internal

Methods

fmap :: (a %1 -> b) %1 -> RIO a %1 -> RIO b Source #

(Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a %1 -> b) %1 -> Generically1 f a %1 -> Generically1 f b Source #

Functor (Of a) Source # 
Instance details

Defined in Streaming.Linear.Internal.Type

Methods

fmap :: (a0 %1 -> b) %1 -> Of a a0 %1 -> Of a b Source #

Functor ((,) a) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a0 %1 -> b) %1 -> (a, a0) %1 -> (a, b) Source #

Functor m => Functor (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

fmap :: (a %1 -> b) %1 -> ReaderT r m a %1 -> ReaderT r m b Source #

Functor m => Functor (StateT s m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

fmap :: (a %1 -> b) %1 -> StateT s m a %1 -> StateT s m b Source #

(Functor m, Functor f) => Functor (Stream f m) Source # 
Instance details

Defined in Streaming.Linear.Internal.Type

Methods

fmap :: (a %1 -> b) %1 -> Stream f m a %1 -> Stream f m b Source #

Functor m => Functor (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

fmap :: (a %1 -> b) %1 -> ReaderT r m a %1 -> ReaderT r m b Source #

Functor m => Functor (StateT s m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

fmap :: (a %1 -> b) %1 -> StateT s m a %1 -> StateT s m b Source #

Functor ((,,) a b) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a0 %1 -> b0) %1 -> (a, b, a0) %1 -> (a, b, b0) Source #

(Functor f, Functor g) => Functor (Sum f g) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a %1 -> b) %1 -> Sum f g a %1 -> Sum f g b Source #

(Functor l, Functor r, EitherNoPar1 b1 b2 l r) => Functor (l :*: r) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a %1 -> b) %1 -> (l :*: r) a %1 -> (l :*: r) b Source #

(Functor l, Functor r) => Functor (l :+: r) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a %1 -> b) %1 -> (l :+: r) a %1 -> (l :+: r) b Source #

Functor ((,,,) a b c) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a0 %1 -> b0) %1 -> (a, b, c, a0) %1 -> (a, b, c, b0) Source #

(Functor f, Functor g) => Functor (Compose f g) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a %1 -> b) %1 -> Compose f g a %1 -> Compose f g b Source #

Functor f => Functor (M1 j c f) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a %1 -> b) %1 -> M1 j c f a %1 -> M1 j c f b Source #

(Functor f, Functor g) => Functor (f :.: g) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a %1 -> b) %1 -> (f :.: g) a %1 -> (f :.: g) b Source #

Functor (FUN 'One a :: TYPE LiftedRep -> Type) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a0 %1 -> b) %1 -> FUN 'One a a0 %1 -> FUN 'One a b Source #

Functor ((,,,,) a b c d) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

fmap :: (a0 %1 -> b0) %1 -> (a, b, c, d, a0) %1 -> (a, b, c, d, b0) Source #

(<$>) :: Functor f => (a %1 -> b) %1 -> f a %1 -> f b infixl 4 Source #

(<&>) :: Functor f => f a %1 -> (a %1 -> b) %1 -> f b infixl 1 Source #

   (<&>) = flip fmap
   

(<$) :: (Functor f, Consumable b) => a %1 -> f b %1 -> f a infixl 4 Source #

Linearly typed replacement for the standard (<$) function.

void :: (Functor f, Consumable a) => f a %1 -> f () Source #

Discard a consumable value stored in a control functor.

dataFmapDefault :: Functor f => (a %1 -> b) -> f a %1 -> f b Source #

Apply the control fmap over a data functor.

class (Applicative f, Functor f) => Applicative f where Source #

Control linear applicative functors. These represent effectful computations that could produce continuations that can be applied with <*>.

Minimal complete definition

pure, ((<*>) | liftA2)

Methods

pure :: a %1 -> f a Source #

Inject (and consume) a value into an applicative control functor.

(<*>) :: f (a %1 -> b) %1 -> f a %1 -> f b infixl 4 Source #

Apply the linear function in a control applicative functor to the value of type a in another functor. This is essentialy composing two effectful computations, one that produces a function f :: a %1-> b and one that produces a value of type a into a single effectful computation that produces a value of type b.

liftA2 :: (a %1 -> b %1 -> c) %1 -> f a %1 -> f b %1 -> f c Source #

liftA2 g consumes g linearly as it lifts it over two functors: liftA2 g :: f a %1-> f b %1-> f c.

Instances

Instances details
Applicative Identity Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

pure :: a %1 -> Identity a Source #

(<*>) :: Identity (a %1 -> b) %1 -> Identity a %1 -> Identity b Source #

liftA2 :: (a %1 -> b %1 -> c) %1 -> Identity a %1 -> Identity b %1 -> Identity c Source #

Applicative IO Source # 
Instance details

Defined in System.IO.Linear

Methods

pure :: a %1 -> IO a Source #

(<*>) :: IO (a %1 -> b) %1 -> IO a %1 -> IO b Source #

liftA2 :: (a %1 -> b %1 -> c) %1 -> IO a %1 -> IO b %1 -> IO c Source #

Applicative RIO Source # 
Instance details

Defined in System.IO.Resource.Linear.Internal

Methods

pure :: a %1 -> RIO a Source #

(<*>) :: RIO (a %1 -> b) %1 -> RIO a %1 -> RIO b Source #

liftA2 :: (a %1 -> b %1 -> c) %1 -> RIO a %1 -> RIO b %1 -> RIO c Source #

Monoid a => Applicative ((,) a) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

pure :: a0 %1 -> (a, a0) Source #

(<*>) :: (a, a0 %1 -> b) %1 -> (a, a0) %1 -> (a, b) Source #

liftA2 :: (a0 %1 -> b %1 -> c) %1 -> (a, a0) %1 -> (a, b) %1 -> (a, c) Source #

(Applicative m, Dupable r) => Applicative (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

pure :: a %1 -> ReaderT r m a Source #

(<*>) :: ReaderT r m (a %1 -> b) %1 -> ReaderT r m a %1 -> ReaderT r m b Source #

liftA2 :: (a %1 -> b %1 -> c) %1 -> ReaderT r m a %1 -> ReaderT r m b %1 -> ReaderT r m c Source #

Monad m => Applicative (StateT s m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

pure :: a %1 -> StateT s m a Source #

(<*>) :: StateT s m (a %1 -> b) %1 -> StateT s m a %1 -> StateT s m b Source #

liftA2 :: (a %1 -> b %1 -> c) %1 -> StateT s m a %1 -> StateT s m b %1 -> StateT s m c Source #

(Functor m, Functor f) => Applicative (Stream f m) Source # 
Instance details

Defined in Streaming.Linear.Internal.Type

Methods

pure :: a %1 -> Stream f m a Source #

(<*>) :: Stream f m (a %1 -> b) %1 -> Stream f m a %1 -> Stream f m b Source #

liftA2 :: (a %1 -> b %1 -> c) %1 -> Stream f m a %1 -> Stream f m b %1 -> Stream f m c Source #

Applicative m => Applicative (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

pure :: a %1 -> ReaderT r m a Source #

(<*>) :: ReaderT r m (a %1 -> b) %1 -> ReaderT r m a %1 -> ReaderT r m b Source #

liftA2 :: (a %1 -> b %1 -> c) %1 -> ReaderT r m a %1 -> ReaderT r m b %1 -> ReaderT r m c Source #

(Monoid a, Monoid b) => Applicative ((,,) a b) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

pure :: a0 %1 -> (a, b, a0) Source #

(<*>) :: (a, b, a0 %1 -> b0) %1 -> (a, b, a0) %1 -> (a, b, b0) Source #

liftA2 :: (a0 %1 -> b0 %1 -> c) %1 -> (a, b, a0) %1 -> (a, b, b0) %1 -> (a, b, c) Source #

(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

pure :: a0 %1 -> (a, b, c, a0) Source #

(<*>) :: (a, b, c, a0 %1 -> b0) %1 -> (a, b, c, a0) %1 -> (a, b, c, b0) Source #

liftA2 :: (a0 %1 -> b0 %1 -> c0) %1 -> (a, b, c, a0) %1 -> (a, b, c, b0) %1 -> (a, b, c, c0) Source #

dataPureDefault :: Applicative f => a -> f a Source #

Apply the control pure over a data applicative.

class Applicative m => Monad m where Source #

Control linear monads. A linear monad is one in which you sequence linear functions in a context, i.e., you sequence functions of the form a %1-> m b.

Minimal complete definition

(>>=)

Methods

(>>=) :: m a %1 -> (a %1 -> m b) %1 -> m b infixl 1 Source #

x >>= g applies a linear function g linearly (i.e., using it exactly once) on the value of type a inside the value of type m a

(>>) :: m () %1 -> m a %1 -> m a infixl 1 Source #

Instances

Instances details
Monad Identity Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

(>>=) :: Identity a %1 -> (a %1 -> Identity b) %1 -> Identity b Source #

(>>) :: Identity () %1 -> Identity a %1 -> Identity a Source #

Monad IO Source # 
Instance details

Defined in System.IO.Linear

Methods

(>>=) :: IO a %1 -> (a %1 -> IO b) %1 -> IO b Source #

(>>) :: IO () %1 -> IO a %1 -> IO a Source #

Monad RIO Source # 
Instance details

Defined in System.IO.Resource.Linear.Internal

Methods

(>>=) :: RIO a %1 -> (a %1 -> RIO b) %1 -> RIO b Source #

(>>) :: RIO () %1 -> RIO a %1 -> RIO a Source #

Monoid a => Monad ((,) a) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Class

Methods

(>>=) :: (a, a0) %1 -> (a0 %1 -> (a, b)) %1 -> (a, b) Source #

(>>) :: (a, ()) %1 -> (a, a0) %1 -> (a, a0) Source #

(Monad m, Dupable r) => Monad (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

(>>=) :: ReaderT r m a %1 -> (a %1 -> ReaderT r m b) %1 -> ReaderT r m b Source #

(>>) :: ReaderT r m () %1 -> ReaderT r m a %1 -> ReaderT r m a Source #

Monad m => Monad (StateT s m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

(>>=) :: StateT s m a %1 -> (a %1 -> StateT s m b) %1 -> StateT s m b Source #

(>>) :: StateT s m () %1 -> StateT s m a %1 -> StateT s m a Source #

(Functor m, Functor f) => Monad (Stream f m) Source # 
Instance details

Defined in Streaming.Linear.Internal.Type

Methods

(>>=) :: Stream f m a %1 -> (a %1 -> Stream f m b) %1 -> Stream f m b Source #

(>>) :: Stream f m () %1 -> Stream f m a %1 -> Stream f m a Source #

Monad m => Monad (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

(>>=) :: ReaderT r m a %1 -> (a %1 -> ReaderT r m b) %1 -> ReaderT r m b Source #

(>>) :: ReaderT r m () %1 -> ReaderT r m a %1 -> ReaderT r m a Source #

return :: Monad m => a %1 -> m a Source #

join :: Monad m => m (m a) %1 -> m a Source #

Given an effect-producing computation that produces an effect-producing computation that produces an a, simplify it to an effect-producing computation that produces an a.

ap :: Monad m => m (a %1 -> b) %1 -> m a %1 -> m b Source #

Use this operator to define Applicative instances in terms of Monad instances.

foldM :: forall m a b. Monad m => (b %1 -> a %1 -> m b) -> b %1 -> [a] %1 -> m b Source #

Fold from left to right with a linear monad. This is a linear version of foldM.

class Monad m => MonadFail m where Source #

This class handles pattern-matching failure in do-notation. See Control.Monad.Fail for details.

Methods

fail :: String -> m a Source #

newtype Data f a Source #

This is a newtype for deriving Data.XXX classes from Control.XXX classes.

Constructors

Data (f a) 

Instances

Instances details
Applicative f => Applicative (Data f) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Instances

Methods

pure :: a -> Data f a Source #

(<*>) :: Data f (a %1 -> b) %1 -> Data f a %1 -> Data f b Source #

liftA2 :: (a %1 -> b %1 -> c) -> Data f a %1 -> Data f b %1 -> Data f c Source #

Functor f => Functor (Data f) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Instances

Methods

fmap :: (a %1 -> b) -> Data f a %1 -> Data f b Source #

Monad transformers

ReaderT monad transformer

See here to learn about the basics of reader monads. To know about the standard reader monad functions, see the documentation of the standard reader monad here.

reader :: Monad m => (r %1 -> a) %1 -> ReaderT r m a Source #

runReader :: Reader r a %1 -> r %1 -> a Source #

mapReader :: (a %1 -> b) %1 -> Reader r a %1 -> Reader r b Source #

withReader :: (r' %1 -> r) %1 -> Reader r a %1 -> Reader r' a Source #

newtype ReaderT r m a Source #

A linear reader monad transformer. This reader monad requires that use of the read-only state is explict.

The monad instance requires that r be Dupable. This means that you should use the linear reader monad just like the non-linear monad, except that the type system ensures that you explicity use or discard the read-only state (with the Consumable instance).

Constructors

ReaderT (r %1 -> m a) 

Instances

Instances details
Dupable r => MonadTrans (ReaderT r) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

lift :: Monad m => m a %1 -> ReaderT r m a Source #

(Applicative m, Dupable r) => Applicative (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

pure :: a %1 -> ReaderT r m a Source #

(<*>) :: ReaderT r m (a %1 -> b) %1 -> ReaderT r m a %1 -> ReaderT r m b Source #

liftA2 :: (a %1 -> b %1 -> c) %1 -> ReaderT r m a %1 -> ReaderT r m b %1 -> ReaderT r m c Source #

Functor m => Functor (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

fmap :: (a %1 -> b) %1 -> ReaderT r m a %1 -> ReaderT r m b Source #

(Monad m, Dupable r) => Monad (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

(>>=) :: ReaderT r m a %1 -> (a %1 -> ReaderT r m b) %1 -> ReaderT r m b Source #

(>>) :: ReaderT r m () %1 -> ReaderT r m a %1 -> ReaderT r m a Source #

(Applicative m, Dupable r) => Applicative (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

pure :: a -> ReaderT r m a Source #

(<*>) :: ReaderT r m (a %1 -> b) %1 -> ReaderT r m a %1 -> ReaderT r m b Source #

liftA2 :: (a %1 -> b %1 -> c) -> ReaderT r m a %1 -> ReaderT r m b %1 -> ReaderT r m c Source #

Functor m => Functor (ReaderT r m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

fmap :: (a %1 -> b) -> ReaderT r m a %1 -> ReaderT r m b Source #

runReaderT :: ReaderT r m a %1 -> r %1 -> m a Source #

Provide an intial read-only state and run the monadic computation in a reader monad transformer

mapReaderT :: (m a %1 -> n b) %1 -> ReaderT r m a %1 -> ReaderT r n b Source #

withReaderT :: (r' %1 -> r) %1 -> ReaderT r m a %1 -> ReaderT r' m a Source #

local :: (r %1 -> r) %1 -> ReaderT r m a %1 -> ReaderT r m a Source #

asks :: Monad m => (r %1 -> a) %1 -> ReaderT r m a Source #

StateT monad

This is a linear version of the standard state monad. The linear arrows ensure that the state is threaded linearly through functions of the form a %1-> StateT s m a. That is, when sequencing f :: a %1-> StateT s m b and g :: b %1-> StateT s m c, the type system enforces that state produced by $f$ is fed into g.

For this reason, there is only one way to define (>>=):

instance Monad m => Applicative (StateT s m) where
StateT mx >>= f = StateT $ \s -> do
  (x, s') <- mx s
  runStateT (f x) s'

To see examples and learn about all the standard state monad functions, see here. To learn the basics of the state monad, see here.

state :: Applicative m => (s %1 -> (a, s)) %1 -> StateT s m a Source #

runState :: State s a %1 -> s %1 -> (a, s) Source #

evalState :: Consumable s => State s a %1 -> s %1 -> a Source #

Use with care! This consumes the final state, so might be costly at runtime.

execState :: State s () %1 -> s %1 -> s Source #

mapState :: ((a, s) %1 -> (b, s)) %1 -> State s a %1 -> State s b Source #

withState :: (s %1 -> s) %1 -> State s a %1 -> State s a Source #

newtype StateT s m a Source #

A (strict) linear state monad transformer.

Constructors

StateT (s %1 -> m (a, s)) 

Instances

Instances details
MonadTrans (StateT s) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

lift :: Monad m => m a %1 -> StateT s m a Source #

Monad m => Applicative (StateT s m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

pure :: a %1 -> StateT s m a Source #

(<*>) :: StateT s m (a %1 -> b) %1 -> StateT s m a %1 -> StateT s m b Source #

liftA2 :: (a %1 -> b %1 -> c) %1 -> StateT s m a %1 -> StateT s m b %1 -> StateT s m c Source #

Functor m => Functor (StateT s m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

fmap :: (a %1 -> b) %1 -> StateT s m a %1 -> StateT s m b Source #

Monad m => Monad (StateT s m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

(>>=) :: StateT s m a %1 -> (a %1 -> StateT s m b) %1 -> StateT s m b Source #

(>>) :: StateT s m () %1 -> StateT s m a %1 -> StateT s m a Source #

Monad m => Applicative (StateT s m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

pure :: a -> StateT s m a Source #

(<*>) :: StateT s m (a %1 -> b) %1 -> StateT s m a %1 -> StateT s m b Source #

liftA2 :: (a %1 -> b %1 -> c) -> StateT s m a %1 -> StateT s m b %1 -> StateT s m c Source #

Functor m => Functor (StateT s m) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

fmap :: (a %1 -> b) -> StateT s m a %1 -> StateT s m b Source #

runStateT :: StateT s m a %1 -> s %1 -> m (a, s) Source #

evalStateT :: (Functor m, Consumable s) => StateT s m a %1 -> s %1 -> m a Source #

Use with care! This consumes the final state, so might be costly at runtime.

execStateT :: Functor m => StateT s m () %1 -> s %1 -> m s Source #

mapStateT :: (m (a, s) %1 -> n (b, s)) %1 -> StateT s m a %1 -> StateT s n b Source #

withStateT :: (s %1 -> s) %1 -> StateT s m a %1 -> StateT s m a Source #

get :: (Applicative m, Dupable s) => StateT s m s Source #

put :: (Applicative m, Consumable s) => s %1 -> StateT s m () Source #

modify :: Applicative m => (s %1 -> s) %1 -> StateT s m () Source #

gets :: (Applicative m, Dupable s) => (s %1 -> a) %1 -> StateT s m a Source #

class (forall m. Monad m => Monad (t m)) => MonadTrans t where Source #

Methods

lift :: Monad m => m a %1 -> t m a Source #

Instances

Instances details
Dupable r => MonadTrans (ReaderT r) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

lift :: Monad m => m a %1 -> ReaderT r m a Source #

MonadTrans (StateT s) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.State

Methods

lift :: Monad m => m a %1 -> StateT s m a Source #

Functor f => MonadTrans (Stream f) Source # 
Instance details

Defined in Streaming.Linear.Internal.Type

Methods

lift :: Monad m => m a %1 -> Stream f m a Source #

MonadTrans (ReaderT r) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Reader

Methods

lift :: Monad m => m a %1 -> ReaderT r m a Source #

newtype Data f a Source #

This is a newtype for deriving Data.XXX classes from Control.XXX classes.

Constructors

Data (f a) 

Instances

Instances details
Applicative f => Applicative (Data f) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Instances

Methods

pure :: a -> Data f a Source #

(<*>) :: Data f (a %1 -> b) %1 -> Data f a %1 -> Data f b Source #

liftA2 :: (a %1 -> b %1 -> c) -> Data f a %1 -> Data f b %1 -> Data f c Source #

Functor f => Functor (Data f) Source # 
Instance details

Defined in Control.Functor.Linear.Internal.Instances

Methods

fmap :: (a %1 -> b) -> Data f a %1 -> Data f b Source #