planet-mitchell-0.1.0: Planet Mitchell

Safe HaskellSafe
LanguageHaskell2010

Ala.Compose

Synopsis
  • newtype Compose (f :: k -> *) (g :: k1 -> k) (a :: k1) :: forall k k1. (k -> *) -> (k1 -> k) -> k1 -> * = Compose {}

Documentation

newtype Compose (f :: k -> *) (g :: k1 -> k) (a :: k1) :: forall k k1. (k -> *) -> (k1 -> k) -> k1 -> * infixr 9 #

Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.

Constructors

Compose infixr 9 

Fields

Instances
Functor f => Generic1 (Compose f g :: k -> *) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep1 (Compose f g) :: k -> * #

Methods

from1 :: Compose f g a -> Rep1 (Compose f g) a #

to1 :: Rep1 (Compose f g) a -> Compose f g a #

Functor f => MFunctor (Compose f :: (* -> *) -> * -> *) 
Instance details

Defined in Control.Monad.Morph

Methods

hoist :: Monad m => (forall a. m a -> n a) -> Compose f m b -> Compose f n b #

Sieve (ReifiedIndexedFold i) (Compose [] ((,) i)) 
Instance details

Defined in Control.Lens.Reified

Methods

sieve :: ReifiedIndexedFold i a b -> a -> Compose [] ((,) i) b #

(Sieve p f, Sieve q g) => Sieve (Procompose p q) (Compose g f) 
Instance details

Defined in Data.Profunctor.Composition

Methods

sieve :: Procompose p q a b -> a -> Compose g f b #

(Cosieve p f, Cosieve q g) => Cosieve (Procompose p q) (Compose f g) 
Instance details

Defined in Data.Profunctor.Composition

Methods

cosieve :: Procompose p q a b -> Compose f g a -> b #

(Functor f, Functor g) => Functor (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

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

(<$) :: a -> Compose f g b -> Compose f g a #

(Applicative f, Applicative g) => Applicative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a #

(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(*>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<*) :: Compose f g a -> Compose f g b -> Compose f g a #

(Foldable f, Foldable g) => Foldable (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fold :: Monoid m => Compose f g m -> m #

foldMap :: Monoid m => (a -> m) -> Compose f g a -> m #

foldr :: (a -> b -> b) -> b -> Compose f g a -> b #

foldr' :: (a -> b -> b) -> b -> Compose f g a -> b #

foldl :: (b -> a -> b) -> b -> Compose f g a -> b #

foldl' :: (b -> a -> b) -> b -> Compose f g a -> b #

foldr1 :: (a -> a -> a) -> Compose f g a -> a #

foldl1 :: (a -> a -> a) -> Compose f g a -> a #

toList :: Compose f g a -> [a] #

null :: Compose f g a -> Bool #

length :: Compose f g a -> Int #

elem :: Eq a => a -> Compose f g a -> Bool #

maximum :: Ord a => Compose f g a -> a #

minimum :: Ord a => Compose f g a -> a #

sum :: Num a => Compose f g a -> a #

product :: Num a => Compose f g a -> a #

(Traversable f, Traversable g) => Traversable (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Compose f g a -> f0 (Compose f g b) #

sequenceA :: Applicative f0 => Compose f g (f0 a) -> f0 (Compose f g a) #

mapM :: Monad m => (a -> m b) -> Compose f g a -> m (Compose f g b) #

sequence :: Monad m => Compose f g (m a) -> m (Compose f g a) #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Compose f g a -> Compose f g [a] #

many :: Compose f g a -> Compose f g [a] #

(Distributive f, Distributive g) => Distributive (Compose f g) 
Instance details

Defined in Data.Distributive

Methods

distribute :: Functor f0 => f0 (Compose f g a) -> Compose f g (f0 a) #

collect :: Functor f0 => (a -> Compose f g b) -> f0 a -> Compose f g (f0 b) #

distributeM :: Monad m => m (Compose f g a) -> Compose f g (m a) #

collectM :: Monad m => (a -> Compose f g b) -> m a -> Compose f g (m b) #

(Functor f, Contravariant g) => Contravariant (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a -> b) -> Compose f g b -> Compose f g a #

(>$) :: b -> Compose f g b -> Compose f g a #

(Representable f, Representable g) => Representable (Compose f g) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Compose f g) :: * #

Methods

tabulate :: (Rep (Compose f g) -> a) -> Compose f g a #

index :: Compose f g a -> Rep (Compose f g) -> a #

(ToJSON1 f, ToJSON1 g) => ToJSON1 (Compose f g) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Value) -> ([a] -> Value) -> Compose f g a -> Value #

liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [Compose f g a] -> Value #

liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> Compose f g a -> Encoding #

liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [Compose f g a] -> Encoding #

(FromJSON1 f, FromJSON1 g) => FromJSON1 (Compose f g) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Compose f g a) #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Compose f g a] #

(Eq1 f, Eq1 g) => Eq1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftEq :: (a -> b -> Bool) -> Compose f g a -> Compose f g b -> Bool #

(Ord1 f, Ord1 g) => Ord1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftCompare :: (a -> b -> Ordering) -> Compose f g a -> Compose f g b -> Ordering #

(Read1 f, Read1 g) => Read1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Compose f g a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Compose f g a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Compose f g a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Compose f g a] #

(Show1 f, Show1 g) => Show1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Compose f g a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Compose f g a] -> ShowS #

(Functor f, Functor g, Compactable g) => Compactable (Compose f g) 
Instance details

Defined in Control.Compactable

Methods

compact :: Compose f g (Maybe a) -> Compose f g a #

separate :: Compose f g (Either l r) -> (Compose f g l, Compose f g r) #

filter :: (a -> Bool) -> Compose f g a -> Compose f g a #

partition :: (a -> Bool) -> Compose f g a -> (Compose f g a, Compose f g a) #

fmapMaybe :: Functor (Compose f g) => (a -> Maybe b) -> Compose f g a -> Compose f g b #

fmapEither :: Functor (Compose f g) => (a -> Either l r) -> Compose f g a -> (Compose f g l, Compose f g r) #

applyMaybe :: Applicative (Compose f g) => Compose f g (a -> Maybe b) -> Compose f g a -> Compose f g b #

applyEither :: Applicative (Compose f g) => Compose f g (a -> Either l r) -> Compose f g a -> (Compose f g l, Compose f g r) #

bindMaybe :: Monad (Compose f g) => Compose f g a -> (a -> Compose f g (Maybe b)) -> Compose f g b #

bindEither :: Monad (Compose f g) => Compose f g a -> (a -> Compose f g (Either l r)) -> (Compose f g l, Compose f g r) #

traverseMaybe :: (Applicative g0, Traversable (Compose f g)) => (a -> g0 (Maybe b)) -> Compose f g a -> g0 (Compose f g b) #

traverseEither :: (Applicative g0, Traversable (Compose f g)) => (a -> g0 (Either l r)) -> Compose f g a -> g0 (Compose f g l, Compose f g r) #

(Applicative f, Divisible g) => Divisible (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Compose f g b -> Compose f g c -> Compose f g a #

conquer :: Compose f g a #

(Applicative f, Decidable g) => Decidable (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Compose f g a #

choose :: (a -> Either b c) -> Compose f g b -> Compose f g c -> Compose f g a #

(NFData1 f, NFData1 g) => NFData1 (Compose f g)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Compose f g a -> () #

(Hashable1 f, Hashable1 g) => Hashable1 (Compose f g) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Compose f g a -> Int #

(Apply f, Apply g) => Apply (Compose f g) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

(.>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<.) :: Compose f g a -> Compose f g b -> Compose f g a #

liftF2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(Traversable1 f, Traversable1 g) => Traversable1 (Compose f g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Compose f g a -> f0 (Compose f g b) #

sequence1 :: Apply f0 => Compose f g (f0 b) -> f0 (Compose f g b) #

(Pointed p, Pointed q) => Pointed (Compose p q) 
Instance details

Defined in Data.Pointed

Methods

point :: a -> Compose p q a #

(Copointed p, Copointed q) => Copointed (Compose p q) 
Instance details

Defined in Data.Copointed

Methods

copoint :: Compose p q a -> a #

(Foldable1 f, Foldable1 g) => Foldable1 (Compose f g) 
Instance details

Defined in Data.Semigroup.Foldable.Class

Methods

fold1 :: Semigroup m => Compose f g m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Compose f g a -> m #

toNonEmpty :: Compose f g a -> NonEmpty a #

(Plus f, Functor g) => Plus (Compose f g) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Compose f g a #

(Alt f, Functor g) => Alt (Compose f g) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Applicative (Compose f g) => Compose f g a -> Compose f g [a] #

many :: Applicative (Compose f g) => Compose f g a -> Compose f g [a] #

(Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(==) :: Compose f g a -> Compose f g a -> Bool #

(/=) :: Compose f g a -> Compose f g a -> Bool #

(Typeable a, Typeable f, Typeable g, Typeable k1, Typeable k2, Data (f (g a))) => Data (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Compose f g a -> c (Compose f g a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Compose f g a) #

toConstr :: Compose f g a -> Constr #

dataTypeOf :: Compose f g a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Compose f g a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Compose f g a)) #

gmapT :: (forall b. Data b => b -> b) -> Compose f g a -> Compose f g a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Compose f g a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Compose f g a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) #

(Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

compare :: Compose f g a -> Compose f g a -> Ordering #

(<) :: Compose f g a -> Compose f g a -> Bool #

(<=) :: Compose f g a -> Compose f g a -> Bool #

(>) :: Compose f g a -> Compose f g a -> Bool #

(>=) :: Compose f g a -> Compose f g a -> Bool #

max :: Compose f g a -> Compose f g a -> Compose f g a #

min :: Compose f g a -> Compose f g a -> Compose f g a #

(Read1 f, Read1 g, Read a) => Read (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

readsPrec :: Int -> ReadS (Compose f g a) #

readList :: ReadS [Compose f g a] #

readPrec :: ReadPrec (Compose f g a) #

readListPrec :: ReadPrec [Compose f g a] #

(Show1 f, Show1 g, Show a) => Show (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

showsPrec :: Int -> Compose f g a -> ShowS #

show :: Compose f g a -> String #

showList :: [Compose f g a] -> ShowS #

Generic (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: * -> * #

Methods

from :: Compose f g a -> Rep (Compose f g a) x #

to :: Rep (Compose f g a) x -> Compose f g a #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a)

In general, hash (Compose x) ≠ hash x. However, hashWithSalt satisfies its variant of this equivalence.

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Compose f g a -> Int #

hash :: Compose f g a -> Int #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Compose f g a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Compose f g a -> Value #

toEncoding :: Compose f g a -> Encoding #

toJSONList :: [Compose f g a] -> Value #

toEncodingList :: [Compose f g a] -> Encoding #

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (Compose f g a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Compose f g a) #

parseJSONList :: Value -> Parser [Compose f g a] #

(NFData1 f, NFData1 g, NFData a) => NFData (Compose f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Compose f g a -> () #

Wrapped (Compose f g a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Compose f g a) :: * #

Methods

_Wrapped' :: Iso' (Compose f g a) (Unwrapped (Compose f g a)) #

t ~ Compose f' g' a' => Rewrapped (Compose f g a) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep1 (Compose f g :: k -> *) 
Instance details

Defined in Data.Functor.Compose

type Rep1 (Compose f g :: k -> *) = D1 (MetaData "Compose" "Data.Functor.Compose" "base" True) (C1 (MetaCons "Compose" PrefixI True) (S1 (MetaSel (Just "getCompose") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (f :.: Rec1 g)))
type Rep (Compose f g) 
Instance details

Defined in Data.Functor.Rep

type Rep (Compose f g) = (Rep f, Rep g)
type Rep (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

type Rep (Compose f g a) = D1 (MetaData "Compose" "Data.Functor.Compose" "base" True) (C1 (MetaCons "Compose" PrefixI True) (S1 (MetaSel (Just "getCompose") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f (g a)))))
type Unwrapped (Compose f g a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Compose f g a) = f (g a)