Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype IFix f ix = IFix {}
- cata :: IFunctor f => (f a ~~> a) -> IFix f ~~> a
- prepro :: IFunctor f => (forall b. f b ~~> f b) -> (f a ~~> a) -> IFix f ~~> a
- para :: IFunctor f => (f (Product (IFix f) a) ~~> a) -> IFix f ~~> a
- zygo :: IFunctor f => (f b ~~> b) -> (f (Product b a) ~~> a) -> IFix f ~~> a
- histo :: IFunctor f => (f (ICofree f a) ~~> a) -> IFix f ~~> a
- ana :: IFunctor f => (a ~~> f a) -> a ~~> IFix f
- postpro :: IFunctor f => (forall b. f b ~~> f b) -> (a ~~> f a) -> a ~~> IFix f
- apo :: IFunctor f => (a ~~> f (Sum (IFix f) a)) -> a ~~> IFix f
- gapo :: IFunctor f => (b ~~> f b) -> (a ~~> f (Sum b a)) -> a ~~> IFix f
- futu :: IFunctor f => (a ~~> f (IFree f a)) -> a ~~> IFix f
- hylo :: IFunctor f => (f b ~~> b) -> (a ~~> f a) -> a ~~> b
- dyna :: IFunctor f => (f (ICofree f b) ~~> b) -> (a ~~> f a) -> a ~~> b
- chrono :: IFunctor f => (f (ICofree f b) ~~> b) -> (a ~~> f (IFree f a)) -> a ~~> b
- meta :: (IFunctor f, IFunctor g) => (f a ~~> a) -> (a ~~> b) -> (b ~~> g b) -> IFix f ~~> IFix g
- elgot :: forall f a b. IFunctor f => (f a ~~> a) -> (b ~~> Sum a (f b)) -> b ~~> a
- coelgot :: forall f a b. IFunctor f => (Product a (f b) ~~> b) -> (a ~~> f a) -> a ~~> b
- cataM :: (ITraversable f, Monad m) => (forall ix. SingI ix => f a ix -> m (a ix)) -> forall ix. SingI ix => IFix f ix -> m (a ix)
- paraM :: (ITraversable f, Monad m) => (forall ix. SingI ix => f (Product (IFix f) a) ix -> m (a ix)) -> forall ix. SingI ix => IFix f ix -> m (a ix)
- anaM :: (ITraversable f, Monad m) => (forall ix. SingI ix => a ix -> m (f a ix)) -> forall ix. SingI ix => a ix -> m (IFix f ix)
- apoM :: (ITraversable f, Monad m) => (forall ix. SingI ix => a ix -> m (f (Sum (IFix f) a) ix)) -> forall ix. SingI ix => a ix -> m (IFix f ix)
- hyloM :: (ITraversable f, Monad m) => (forall ix. SingI ix => f b ix -> m (b ix)) -> (forall ix. SingI ix => a ix -> m (f a ix)) -> forall ix. SingI ix => a ix -> m (b ix)
- dynaM :: (ITraversable f, Monad m) => (forall ix. SingI ix => f (ICofree f b) ix -> m (b ix)) -> (forall ix. SingI ix => a ix -> m (f a ix)) -> forall ix. SingI ix => a ix -> m (b ix)
- type DistLaw f g = forall a. f (g a) ~~> g (f a)
- distCata :: IFunctor f => DistLaw f IIdentity
- distPara :: IFunctor f => DistLaw f (Product (IFix f))
- distZygo :: IFunctor f => (f b ~~> b) -> DistLaw f (Product b)
- distHisto :: IFunctor f => DistLaw f (ICofree f)
- distAna :: IFunctor f => DistLaw IIdentity f
- distApo :: IFunctor f => DistLaw (Sum (IFix f)) f
- distGApo :: IFunctor f => (b ~~> f b) -> DistLaw (Sum b) f
- distFutu :: IFunctor f => DistLaw (IFree f) f
- gfold :: forall f w a. (IFunctor f, IComonad w) => DistLaw f w -> (f (w a) ~~> a) -> IFix f ~~> a
- gunfold :: forall f m a. (IFunctor f, IMonad m) => DistLaw m f -> (a ~~> f (m a)) -> a ~~> IFix f
- ghylo :: forall f w m a b. (IFunctor f, IComonad w, IMonad m) => DistLaw f w -> DistLaw m f -> (f (w b) ~~> b) -> (a ~~> f (m a)) -> a ~~> b
- gprepro :: forall f w a. (IFunctor f, IComonad w) => DistLaw f w -> (forall c. f c ~~> f c) -> (f (w a) ~~> a) -> IFix f ~~> a
- gpostpro :: forall f m a. (IFunctor f, IMonad m) => DistLaw m f -> (forall c. f c ~~> f c) -> (a ~~> f (m a)) -> a ~~> IFix f
- gfoldM :: forall f w m a. (ITraversable f, ITraversable w, IComonad w, Monad m) => DistLaw f w -> (forall ix. SingI ix => f (w a) ix -> m (a ix)) -> forall ix. SingI ix => IFix f ix -> m (a ix)
- gunfoldM :: forall f m a x. (ITraversable f, ITraversable m, IMonad m, Monad x) => DistLaw m f -> (forall ix. SingI ix => a ix -> x (f (m a) ix)) -> forall ix. SingI ix => a ix -> x (IFix f ix)
- ghyloM :: forall f w m a b x. (ITraversable f, ITraversable w, ITraversable m, IComonad w, IMonad m, Monad x) => DistLaw f w -> DistLaw m f -> (forall ix. SingI ix => f (w b) ix -> x (b ix)) -> (forall ix. SingI ix => a ix -> x (f (m a) ix)) -> forall ix. SingI ix => a ix -> x (b ix)
- newtype Const a (b :: k) = Const {
- getConst :: a
- data Product (f :: k -> Type) (g :: k -> Type) (a :: k) = Pair (f a) (g a)
- data Sum (f :: k -> Type) (g :: k -> Type) (a :: k)
- class IFunctor f => IComonad f where
- type (~~>) a b = forall ix. SingI ix => a ix -> b ix
- class IFunctor f where
- module Data.IFunctor.Classes
- data ICofree f a ix = (a ix) ::< (f (ICofree f a) ix)
- data IFree f a ix
- data IIdentity f ix = IIdentity {
- runIIdentity :: f ix
- class IFunctor f => IMonad f where
- class IFunctor f => ITraversable f where
- itraverse :: (Applicative m, SingI ix) => (forall ix. SingI ix => a ix -> m (b ix)) -> f a ix -> m (f b ix)
- imapDefault :: ITraversable f => (a ~~> b) -> f a ~~> f b
- class SingI (a :: k) where
Fixpoint for indexed types
Fixpoint type
Instances
Generic1 (IFix f :: k -> Type) Source # | |
(IEq f, SingI ix) => Eq (IFix f ix) Source # | |
(IOrd f, SingI ix) => Ord (IFix f ix) Source # | |
Defined in Data.IFunctor.Foldable | |
(IRead f, SingI ix) => Read (IFix f ix) Source # | |
(IShow f, SingI ix) => Show (IFix f ix) Source # | |
Generic (IFix f ix) Source # | |
type Rep1 (IFix f :: k -> Type) Source # | |
Defined in Data.IFunctor.Foldable | |
type Rep (IFix f ix) Source # | |
Defined in Data.IFunctor.Foldable |
Morphisms
Constructive morphisms
prepro :: IFunctor f => (forall b. f b ~~> f b) -> (f a ~~> a) -> IFix f ~~> a Source #
Fokkinga's prepromorphism
Destructive morphisms
postpro :: IFunctor f => (forall b. f b ~~> f b) -> (a ~~> f a) -> a ~~> IFix f Source #
Fokkinga's postpromorphism
Combined morphisms
chrono :: IFunctor f => (f (ICofree f b) ~~> b) -> (a ~~> f (IFree f a)) -> a ~~> b Source #
Chronomorphism
meta :: (IFunctor f, IFunctor g) => (f a ~~> a) -> (a ~~> b) -> (b ~~> g b) -> IFix f ~~> IFix g Source #
Metamorphism TODO: ensure only 1 pass over structure
Monadic morphisms
cataM :: (ITraversable f, Monad m) => (forall ix. SingI ix => f a ix -> m (a ix)) -> forall ix. SingI ix => IFix f ix -> m (a ix) Source #
Monadic catamorphism
paraM :: (ITraversable f, Monad m) => (forall ix. SingI ix => f (Product (IFix f) a) ix -> m (a ix)) -> forall ix. SingI ix => IFix f ix -> m (a ix) Source #
Monadic Paramorphism
anaM :: (ITraversable f, Monad m) => (forall ix. SingI ix => a ix -> m (f a ix)) -> forall ix. SingI ix => a ix -> m (IFix f ix) Source #
Monadic anamorphism
apoM :: (ITraversable f, Monad m) => (forall ix. SingI ix => a ix -> m (f (Sum (IFix f) a) ix)) -> forall ix. SingI ix => a ix -> m (IFix f ix) Source #
Monadic apomorphism
hyloM :: (ITraversable f, Monad m) => (forall ix. SingI ix => f b ix -> m (b ix)) -> (forall ix. SingI ix => a ix -> m (f a ix)) -> forall ix. SingI ix => a ix -> m (b ix) Source #
Monadic hylomorphism
dynaM :: (ITraversable f, Monad m) => (forall ix. SingI ix => f (ICofree f b) ix -> m (b ix)) -> (forall ix. SingI ix => a ix -> m (f a ix)) -> forall ix. SingI ix => a ix -> m (b ix) Source #
Monadic dynamorphism
Distribution Laws
Constructive distribution laws
Destructive distribution laws
Generalized morphisms
gfold :: forall f w a. (IFunctor f, IComonad w) => DistLaw f w -> (f (w a) ~~> a) -> IFix f ~~> a Source #
Generalized fold
gunfold :: forall f m a. (IFunctor f, IMonad m) => DistLaw m f -> (a ~~> f (m a)) -> a ~~> IFix f Source #
Generalized unfold
ghylo :: forall f w m a b. (IFunctor f, IComonad w, IMonad m) => DistLaw f w -> DistLaw m f -> (f (w b) ~~> b) -> (a ~~> f (m a)) -> a ~~> b Source #
Generalized hylomorphism
gprepro :: forall f w a. (IFunctor f, IComonad w) => DistLaw f w -> (forall c. f c ~~> f c) -> (f (w a) ~~> a) -> IFix f ~~> a Source #
Generalized prepromorphism
gpostpro :: forall f m a. (IFunctor f, IMonad m) => DistLaw m f -> (forall c. f c ~~> f c) -> (a ~~> f (m a)) -> a ~~> IFix f Source #
Generalized postpromorphism
Generalized monadic morphisms
gfoldM :: forall f w m a. (ITraversable f, ITraversable w, IComonad w, Monad m) => DistLaw f w -> (forall ix. SingI ix => f (w a) ix -> m (a ix)) -> forall ix. SingI ix => IFix f ix -> m (a ix) Source #
Generalized monadic fold
gunfoldM :: forall f m a x. (ITraversable f, ITraversable m, IMonad m, Monad x) => DistLaw m f -> (forall ix. SingI ix => a ix -> x (f (m a) ix)) -> forall ix. SingI ix => a ix -> x (IFix f ix) Source #
Generalized monadic unfold
ghyloM :: forall f w m a b x. (ITraversable f, ITraversable w, ITraversable m, IComonad w, IMonad m, Monad x) => DistLaw f w -> DistLaw m f -> (forall ix. SingI ix => f (w b) ix -> x (b ix)) -> (forall ix. SingI ix => a ix -> x (f (m a) ix)) -> forall ix. SingI ix => a ix -> x (b ix) Source #
Generalized monadic hylomorphism
Re-exports
The Const
functor.
Instances
Generic1 (Const a :: k -> Type) | Since: base-4.9.0.0 |
Functor (Const m :: Type -> Type) | Since: base-2.1 |
Monoid m => Applicative (Const m :: Type -> Type) | Since: base-2.0.1 |
Foldable (Const m :: Type -> Type) | Since: base-4.7.0.0 |
Defined in Data.Functor.Const fold :: Monoid m0 => Const m m0 -> m0 # foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldr :: (a -> b -> b) -> b -> Const m a -> b # foldr' :: (a -> b -> b) -> b -> Const m a -> b # foldl :: (b -> a -> b) -> b -> Const m a -> b # foldl' :: (b -> a -> b) -> b -> Const m a -> b # foldr1 :: (a -> a -> a) -> Const m a -> a # foldl1 :: (a -> a -> a) -> Const m a -> a # elem :: Eq a => a -> Const m a -> Bool # maximum :: Ord a => Const m a -> a # minimum :: Ord a => Const m a -> a # | |
Traversable (Const m :: Type -> Type) | Since: base-4.7.0.0 |
Bounded a => Bounded (Const a b) | Since: base-4.9.0.0 |
Enum a => Enum (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const succ :: Const a b -> Const a b # pred :: Const a b -> Const a b # fromEnum :: Const a b -> Int # enumFrom :: Const a b -> [Const a b] # enumFromThen :: Const a b -> Const a b -> [Const a b] # enumFromTo :: Const a b -> Const a b -> [Const a b] # enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] # | |
Eq a => Eq (Const a b) | Since: base-4.9.0.0 |
Floating a => Floating (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const exp :: Const a b -> Const a b # log :: Const a b -> Const a b # sqrt :: Const a b -> Const a b # (**) :: Const a b -> Const a b -> Const a b # logBase :: Const a b -> Const a b -> Const a b # sin :: Const a b -> Const a b # cos :: Const a b -> Const a b # tan :: Const a b -> Const a b # asin :: Const a b -> Const a b # acos :: Const a b -> Const a b # atan :: Const a b -> Const a b # sinh :: Const a b -> Const a b # cosh :: Const a b -> Const a b # tanh :: Const a b -> Const a b # asinh :: Const a b -> Const a b # acosh :: Const a b -> Const a b # atanh :: Const a b -> Const a b # log1p :: Const a b -> Const a b # expm1 :: Const a b -> Const a b # | |
Fractional a => Fractional (Const a b) | Since: base-4.9.0.0 |
Integral a => Integral (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
(Typeable k, Data a, Typeable b) => Data (Const a b) | Since: base-4.10.0.0 |
Defined in Data.Data gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Const a b -> c (Const a b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const a b) # toConstr :: Const a b -> Constr # dataTypeOf :: Const a b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Const a b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const a b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Const a b -> Const a b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r # gmapQ :: (forall d. Data d => d -> u) -> Const a b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Const a b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) # | |
Num a => Num (Const a b) | Since: base-4.9.0.0 |
Ord a => Ord (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
Read a => Read (Const a b) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
Real a => Real (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const toRational :: Const a b -> Rational # | |
RealFloat a => RealFloat (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const floatRadix :: Const a b -> Integer # floatDigits :: Const a b -> Int # floatRange :: Const a b -> (Int, Int) # decodeFloat :: Const a b -> (Integer, Int) # encodeFloat :: Integer -> Int -> Const a b # exponent :: Const a b -> Int # significand :: Const a b -> Const a b # scaleFloat :: Int -> Const a b -> Const a b # isInfinite :: Const a b -> Bool # isDenormalized :: Const a b -> Bool # isNegativeZero :: Const a b -> Bool # | |
RealFrac a => RealFrac (Const a b) | Since: base-4.9.0.0 |
Show a => Show (Const a b) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
Ix a => Ix (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const range :: (Const a b, Const a b) -> [Const a b] # index :: (Const a b, Const a b) -> Const a b -> Int # unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int # inRange :: (Const a b, Const a b) -> Const a b -> Bool # rangeSize :: (Const a b, Const a b) -> Int # unsafeRangeSize :: (Const a b, Const a b) -> Int # | |
Generic (Const a b) | Since: base-4.9.0.0 |
Semigroup a => Semigroup (Const a b) | Since: base-4.9.0.0 |
Monoid a => Monoid (Const a b) | Since: base-4.9.0.0 |
Storable a => Storable (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
Bits a => Bits (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const (.&.) :: Const a b -> Const a b -> Const a b # (.|.) :: Const a b -> Const a b -> Const a b # xor :: Const a b -> Const a b -> Const a b # complement :: Const a b -> Const a b # shift :: Const a b -> Int -> Const a b # rotate :: Const a b -> Int -> Const a b # setBit :: Const a b -> Int -> Const a b # clearBit :: Const a b -> Int -> Const a b # complementBit :: Const a b -> Int -> Const a b # testBit :: Const a b -> Int -> Bool # bitSizeMaybe :: Const a b -> Maybe Int # isSigned :: Const a b -> Bool # shiftL :: Const a b -> Int -> Const a b # unsafeShiftL :: Const a b -> Int -> Const a b # shiftR :: Const a b -> Int -> Const a b # unsafeShiftR :: Const a b -> Int -> Const a b # rotateL :: Const a b -> Int -> Const a b # | |
FiniteBits a => FiniteBits (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const finiteBitSize :: Const a b -> Int # countLeadingZeros :: Const a b -> Int # countTrailingZeros :: Const a b -> Int # | |
type Rep1 (Const a :: k -> Type) | |
Defined in Data.Functor.Const | |
type Rep (Const a b) | |
Defined in Data.Functor.Const |
data Product (f :: k -> Type) (g :: k -> Type) (a :: k) #
Lifted product of functors.
Pair (f a) (g a) |
Instances
IFunctor (Product a :: (k -> Type) -> k -> Type) Source # | |
IOrd2 a => IOrd (Product a :: (k -> Type) -> k -> Type) Source # | |
IEq2 a => IEq (Product a :: (k -> Type) -> k -> Type) Source # | |
IRead2 a => IRead (Product a :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.Classes | |
IShow2 a => IShow (Product a :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.Classes | |
ITraversable (Product a :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.ITraversable | |
IComonad (Product a :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IComonad | |
Generic1 (Product f g :: k -> Type) | Since: base-4.9.0.0 |
(Monad f, Monad g) => Monad (Product f g) | Since: base-4.9.0.0 |
(Functor f, Functor g) => Functor (Product f g) | Since: base-4.9.0.0 |
(MonadFix f, MonadFix g) => MonadFix (Product f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product | |
(Applicative f, Applicative g) => Applicative (Product f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product | |
(Foldable f, Foldable g) => Foldable (Product f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product fold :: Monoid m => Product f g m -> m # foldMap :: Monoid m => (a -> m) -> Product f g a -> m # foldMap' :: Monoid m => (a -> m) -> Product f g a -> m # foldr :: (a -> b -> b) -> b -> Product f g a -> b # foldr' :: (a -> b -> b) -> b -> Product f g a -> b # foldl :: (b -> a -> b) -> b -> Product f g a -> b # foldl' :: (b -> a -> b) -> b -> Product f g a -> b # foldr1 :: (a -> a -> a) -> Product f g a -> a # foldl1 :: (a -> a -> a) -> Product f g a -> a # toList :: Product f g a -> [a] # null :: Product f g a -> Bool # length :: Product f g a -> Int # elem :: Eq a => a -> Product f g a -> Bool # maximum :: Ord a => Product f g a -> a # minimum :: Ord a => Product f g a -> a # | |
(Traversable f, Traversable g) => Traversable (Product f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product | |
(Eq1 f, Eq1 g) => Eq1 (Product f g) | Since: base-4.9.0.0 |
(Ord1 f, Ord1 g) => Ord1 (Product f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product | |
(Read1 f, Read1 g) => Read1 (Product f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Product f g a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Product f g a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Product f g a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Product f g a] # | |
(Show1 f, Show1 g) => Show1 (Product f g) | Since: base-4.9.0.0 |
(MonadZip f, MonadZip g) => MonadZip (Product f g) | Since: base-4.9.0.0 |
(Alternative f, Alternative g) => Alternative (Product f g) | Since: base-4.9.0.0 |
(MonadPlus f, MonadPlus g) => MonadPlus (Product f g) | Since: base-4.9.0.0 |
(Eq1 f, Eq1 g, Eq a) => Eq (Product f g a) | Since: base-4.9.0.0 |
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Product f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Product f g a -> c (Product f g a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Product f g a) # toConstr :: Product f g a -> Constr # dataTypeOf :: Product f g a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Product f g a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Product f g a)) # gmapT :: (forall b. Data b => b -> b) -> Product f g a -> Product f g a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Product f g a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Product f g a -> r # gmapQ :: (forall d. Data d => d -> u) -> Product f g a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Product f g a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Product f g a -> m (Product f g a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Product f g a -> m (Product f g a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Product f g a -> m (Product f g a) # | |
(Ord1 f, Ord1 g, Ord a) => Ord (Product f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product compare :: Product f g a -> Product f g a -> Ordering # (<) :: Product f g a -> Product f g a -> Bool # (<=) :: Product f g a -> Product f g a -> Bool # (>) :: Product f g a -> Product f g a -> Bool # (>=) :: Product f g a -> Product f g a -> Bool # | |
(Read1 f, Read1 g, Read a) => Read (Product f g a) | Since: base-4.9.0.0 |
(Show1 f, Show1 g, Show a) => Show (Product f g a) | Since: base-4.9.0.0 |
Generic (Product f g a) | Since: base-4.9.0.0 |
type Rep1 (Product f g :: k -> Type) | |
Defined in Data.Functor.Product type Rep1 (Product f g :: k -> Type) = D1 ('MetaData "Product" "Data.Functor.Product" "base" 'False) (C1 ('MetaCons "Pair" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 g))) | |
type Rep (Product f g a) | |
Defined in Data.Functor.Product type Rep (Product f g a) = D1 ('MetaData "Product" "Data.Functor.Product" "base" 'False) (C1 ('MetaCons "Pair" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (g a)))) |
data Sum (f :: k -> Type) (g :: k -> Type) (a :: k) #
Lifted sum of functors.
Instances
IFunctor (Sum a :: (k -> Type) -> k -> Type) Source # | |
IOrd2 a => IOrd (Sum a :: (k -> Type) -> k -> Type) Source # | |
IEq2 a => IEq (Sum a :: (k -> Type) -> k -> Type) Source # | |
IRead2 a => IRead (Sum a :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.Classes | |
IShow2 a => IShow (Sum a :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.Classes | |
ITraversable (Sum a :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.ITraversable | |
IMonad (Sum a :: (k -> Type) -> k -> Type) Source # | |
Generic1 (Sum f g :: k -> Type) | Since: base-4.9.0.0 |
(Functor f, Functor g) => Functor (Sum f g) | Since: base-4.9.0.0 |
(Foldable f, Foldable g) => Foldable (Sum f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum fold :: Monoid m => Sum f g m -> m # foldMap :: Monoid m => (a -> m) -> Sum f g a -> m # foldMap' :: Monoid m => (a -> m) -> Sum f g a -> m # foldr :: (a -> b -> b) -> b -> Sum f g a -> b # foldr' :: (a -> b -> b) -> b -> Sum f g a -> b # foldl :: (b -> a -> b) -> b -> Sum f g a -> b # foldl' :: (b -> a -> b) -> b -> Sum f g a -> b # foldr1 :: (a -> a -> a) -> Sum f g a -> a # foldl1 :: (a -> a -> a) -> Sum f g a -> a # elem :: Eq a => a -> Sum f g a -> Bool # maximum :: Ord a => Sum f g a -> a # minimum :: Ord a => Sum f g a -> a # | |
(Traversable f, Traversable g) => Traversable (Sum f g) | Since: base-4.9.0.0 |
(Eq1 f, Eq1 g) => Eq1 (Sum f g) | Since: base-4.9.0.0 |
(Ord1 f, Ord1 g) => Ord1 (Sum f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum | |
(Read1 f, Read1 g) => Read1 (Sum f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum | |
(Show1 f, Show1 g) => Show1 (Sum f g) | Since: base-4.9.0.0 |
(Eq1 f, Eq1 g, Eq a) => Eq (Sum f g a) | Since: base-4.9.0.0 |
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Sum f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Sum f g a -> c (Sum f g a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sum f g a) # toConstr :: Sum f g a -> Constr # dataTypeOf :: Sum f g a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Sum f g a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sum f g a)) # gmapT :: (forall b. Data b => b -> b) -> Sum f g a -> Sum f g a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sum f g a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sum f g a -> r # gmapQ :: (forall d. Data d => d -> u) -> Sum f g a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Sum f g a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) # | |
(Ord1 f, Ord1 g, Ord a) => Ord (Sum f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum | |
(Read1 f, Read1 g, Read a) => Read (Sum f g a) | Since: base-4.9.0.0 |
(Show1 f, Show1 g, Show a) => Show (Sum f g a) | Since: base-4.9.0.0 |
Generic (Sum f g a) | Since: base-4.9.0.0 |
type Rep1 (Sum f g :: k -> Type) | |
Defined in Data.Functor.Sum type Rep1 (Sum f g :: k -> Type) = D1 ('MetaData "Sum" "Data.Functor.Sum" "base" 'False) (C1 ('MetaCons "InL" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f)) :+: C1 ('MetaCons "InR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 g))) | |
type Rep (Sum f g a) | |
Defined in Data.Functor.Sum type Rep (Sum f g a) = D1 ('MetaData "Sum" "Data.Functor.Sum" "base" 'False) (C1 ('MetaCons "InL" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a))) :+: C1 ('MetaCons "InR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (g a)))) |
class IFunctor f => IComonad f where Source #
Comonoid in the category of dependent endofunctors
iextract, (iduplicate | iextend)
class IFunctor f where Source #
Functor in the category of dependent types
Instances
IFunctor (IIdentity :: (k -> Type) -> k -> Type) Source # | |
IFunctor (Product a :: (k -> Type) -> k -> Type) Source # | |
IFunctor (Sum a :: (k -> Type) -> k -> Type) Source # | |
IFunctor f => IFunctor (IFree f :: (k -> Type) -> k -> Type) Source # | |
IFunctor f => IFunctor (ICofree f :: (k -> Type) -> k -> Type) Source # | |
module Data.IFunctor.Classes
Cofree IComonad
Instances
Free IMonad
Instances
IIdentity | |
|
Instances
IFunctor (IIdentity :: (k -> Type) -> k -> Type) Source # | |
IOrd (IIdentity :: (k -> Type) -> k -> Type) Source # | |
IEq (IIdentity :: (k -> Type) -> k -> Type) Source # | |
IRead (IIdentity :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.IIdentity | |
IShow (IIdentity :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.IIdentity | |
ITraversable (IIdentity :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.IIdentity | |
IComonad (IIdentity :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.IIdentity | |
IMonad (IIdentity :: (k -> Type) -> k -> Type) Source # | |
Generic1 (IIdentity f :: k -> Type) Source # | |
(IEq2 f, SingI ix) => Eq (IIdentity f ix) Source # | |
(Typeable ix, Typeable f, Typeable k, Data (f ix)) => Data (IIdentity f ix) Source # | |
Defined in Data.IFunctor.IIdentity gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IIdentity f ix -> c (IIdentity f ix) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IIdentity f ix) # toConstr :: IIdentity f ix -> Constr # dataTypeOf :: IIdentity f ix -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IIdentity f ix)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IIdentity f ix)) # gmapT :: (forall b. Data b => b -> b) -> IIdentity f ix -> IIdentity f ix # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IIdentity f ix -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IIdentity f ix -> r # gmapQ :: (forall d. Data d => d -> u) -> IIdentity f ix -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IIdentity f ix -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IIdentity f ix -> m (IIdentity f ix) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IIdentity f ix -> m (IIdentity f ix) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IIdentity f ix -> m (IIdentity f ix) # | |
(IOrd2 f, SingI ix) => Ord (IIdentity f ix) Source # | |
Defined in Data.IFunctor.IIdentity compare :: IIdentity f ix -> IIdentity f ix -> Ordering # (<) :: IIdentity f ix -> IIdentity f ix -> Bool # (<=) :: IIdentity f ix -> IIdentity f ix -> Bool # (>) :: IIdentity f ix -> IIdentity f ix -> Bool # (>=) :: IIdentity f ix -> IIdentity f ix -> Bool # | |
(IRead2 f, SingI ix) => Read (IIdentity f ix) Source # | |
(IShow2 f, SingI ix) => Show (IIdentity f ix) Source # | |
Generic (IIdentity f ix) Source # | |
type Rep1 (IIdentity f :: k -> Type) Source # | |
Defined in Data.IFunctor.IIdentity | |
type Rep (IIdentity f ix) Source # | |
Defined in Data.IFunctor.IIdentity |
class IFunctor f => ITraversable f where Source #
itraverse :: (Applicative m, SingI ix) => (forall ix. SingI ix => a ix -> m (b ix)) -> f a ix -> m (f b ix) Source #
Instances
ITraversable (IIdentity :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.IIdentity | |
ITraversable (Product a :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.ITraversable | |
ITraversable (Sum a :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.ITraversable | |
ITraversable f => ITraversable (IFree f :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.IFree | |
ITraversable f => ITraversable (ICofree f :: (k -> Type) -> k -> Type) Source # | |
Defined in Data.IFunctor.ICofree |
imapDefault :: ITraversable f => (a ~~> b) -> f a ~~> f b Source #