ten-0.1.0.2: Typeclasses like Functor, etc. over arity-1 type constructors.
Safe HaskellNone
LanguageHaskell2010

Data.Ten

Description

Typeclass hierarchy of functors from k -> Type to Type.

The naming convention Functor10 comes from the fact that it's a functor from the category of objects with one type parameter to the category of objects with zero type parameters. See http://hackage.haskell.org/package/hakaru-0.4.0/docs/src/Language.Hakaru.Syntax.IClasses.html for precedent for this naming convention.

In this, the argument morphisms are of the form forall a. m a -> n a, and the result morphisms are of the form f m -> f n.

The main parts of this are:

  • Functor10 and the other similarly-named typeclasses, which are essentially just translations of Functor et al. to kind (k -> Type) -> Type. These are essentially Functors with additional "tag" types available at each occurrence of the argument. Applying them to Identity, you get essentially normal records, but other type parameters give other interesting objects.
  • (:**) and Exists (two stock Functor10 types) plus appropriate instances for products, sums, and compositions of functors as provided by GHC.Generics: (:*:), (:+:), and (:.:).
  • Entails, which uses a GADT-like value to retrieve instances for its type parameter. This adds a lot of power to the otherwise-pretty-weak Functor10 class hierarchy, since without access to corresponding instances, all the input morphisms are unable to do anything whatsoever with the "tag" types. With Entails, though, one can use the fact that every occurrence of m a in f m satisfies c a to make instances of c available while mappingfoldingtraversing/etc. an f m.

The provided GHC.Generics-based deriving functionality is meant to be used with the DerivingVia extension. To get the full suite of classes on a generic-record type, make sure every field is either an Ap10, another nested generic-record, or an instance of Update applied to one of the above. Then, just add the deriving clauses:

    data MyType f = MyType { _mrInt :: Ap10 Int f, _mrBool :: Ap10 Bool f }
      deriving Generic1
      deriving
        ( Functor10, Foldable10, Traversable10
        , Applicative10, Representable10, Update10, Constrained10 c
        ) via Wrapped1 Generic1 MyType
      deriving
        ( Functor10WithIndex, Foldable10WithIndex, Traversable10WithIndex
        ) via Wrapped1 Representable10 MyType

    type instance Index10 MyType = Rep10 MyType
Synopsis

Typeclasses

Functor10

Foldable10

Traversable10

Applicative10

Representable10

Update10

Entails

Standard Functor10s

newtype ((f :: k2 -> Type) :.: (g :: k1 -> k2)) (p :: k1) infixr 7 #

Composition of functors

Constructors

Comp1 

Fields

Instances

Instances details
(Applicative f, Constrained10 c g) => Constrained10 (c :: k -> Constraint) (f :.: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Field

Methods

constrained10 :: (f :.: g) (Dict1 c) Source #

Functor f => Generic1 (f :.: g :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :.: g) :: k -> Type #

Methods

from1 :: forall (a :: k0). (f :.: g) a -> Rep1 (f :.: g) a #

to1 :: forall (a :: k0). Rep1 (f :.: g) a -> (f :.: g) a #

(NFData1 f, GNFData One g) => GNFData One (f :.: g) 
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs One a -> (f :.: g) a -> ()

(Foldable f, Foldable10 g) => Foldable10 (f :.: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Foldable

Methods

foldMap10 :: Monoid w => (forall (a :: k0). m a -> w) -> (f :.: g) m -> w Source #

(Functor f, Functor10 g) => Functor10 (f :.: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Functor

Methods

fmap10 :: (forall (a :: k0). m a -> n a) -> (f :.: g) m -> (f :.: g) n Source #

(Functor g, Functor10WithIndex f) => Functor10WithIndex (g :.: f :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Functor.WithIndex

Methods

imap10 :: (forall (a :: k0). Index10 (g :.: f) a -> m a -> n a) -> (g :.: f) m -> (g :.: f) n Source #

(Foldable g, Foldable10WithIndex f) => Foldable10WithIndex (g :.: f :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Foldable.WithIndex

Methods

ifoldMap10 :: Monoid w => (forall (a :: k0). Index10 (g :.: f) a -> m a -> w) -> (g :.: f) m -> w Source #

(Applicative f, Applicative10 g) => Applicative10 (f :.: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Applicative

Methods

pure10 :: (forall (a :: k0). m a) -> (f :.: g) m Source #

(<*>!) :: forall (m :: k0 -> Type) (n :: k0 -> Type). (f :.: g) (m :->: n) -> (f :.: g) m -> (f :.: g) n Source #

liftA210 :: (forall (a :: k0). m a -> n a -> o a) -> (f :.: g) m -> (f :.: g) n -> (f :.: g) o Source #

(Traversable f, Traversable10 g) => Traversable10 (f :.: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Traversable

Methods

mapTraverse10 :: forall f0 m n r. Applicative f0 => ((f :.: g) n -> r) -> (forall (a :: k0). m a -> f0 (n a)) -> (f :.: g) m -> f0 r Source #

(Traversable g, Traversable10WithIndex f) => Traversable10WithIndex (g :.: f :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Traversable.WithIndex

Methods

imapTraverse10 :: Applicative g0 => ((g :.: f) n -> r) -> (forall (a :: k0). Index10 (g :.: f) a -> m a -> g0 (n a)) -> (g :.: f) m -> g0 r Source #

(Functor f, FieldPaths f, GFieldPaths10 g) => GFieldPaths10 (f :.: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Field

Methods

gfieldPaths10 :: (forall (a :: k0). [PathComponent] -> r a) -> (f :.: g) r Source #

(Representable f, GTabulate10 g) => GTabulate10 (f :.: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Representable

Methods

gtabulate10 :: (forall (a :: k0). Field10 (f :.: g) a -> r a) -> (f :.: g) r Source #

(Update f, GUpdate10 g) => GUpdate10 (f :.: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Update

Methods

gsetters10 :: (forall (a :: k0). (forall (m :: k0 -> Type). (m a -> m a) -> (f :.: g) m -> (f :.: g) m) -> r a) -> (f :.: g) r Source #

(Functor f, Functor g) => Functor (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

(Applicative f, Applicative g) => Applicative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :.: g) a #

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

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

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

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

(Foldable f, Foldable g) => Foldable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :.: g) m -> m #

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

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

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

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

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

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

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

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

toList :: (f :.: g) a -> [a] #

null :: (f :.: g) a -> Bool #

length :: (f :.: g) a -> Int #

elem :: Eq a => a -> (f :.: g) a -> Bool #

maximum :: Ord a => (f :.: g) a -> a #

minimum :: Ord a => (f :.: g) a -> a #

sum :: Num a => (f :.: g) a -> a #

product :: Num a => (f :.: g) a -> a #

(Traversable f, Traversable g) => Traversable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

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

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

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

(Distributive a, Distributive b) => Distributive (a :.: b) 
Instance details

Defined in Data.Distributive

Methods

distribute :: Functor f => f ((a :.: b) a0) -> (a :.: b) (f a0) #

collect :: Functor f => (a0 -> (a :.: b) b0) -> f a0 -> (a :.: b) (f b0) #

distributeM :: Monad m => m ((a :.: b) a0) -> (a :.: b) (m a0) #

collectM :: Monad m => (a0 -> (a :.: b) b0) -> m a0 -> (a :.: b) (m b0) #

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

Defined in Data.Functor.Contravariant

Methods

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

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

(Representable f, Representable g) => Representable (f :.: g) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (f :.: g) #

Methods

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

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

(Alternative f, Applicative g) => Alternative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :.: g) a #

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

some :: (f :.: g) a -> (f :.: g) [a] #

many :: (f :.: g) a -> (f :.: g) [a] #

(Representable f, GIndex g) => GIndex (f :.: g) 
Instance details

Defined in Data.Functor.Rep

Methods

gindex' :: (f :.: g) a -> GRep' (f :.: g) -> a

(Representable f, GTabulate g) => GTabulate (f :.: g) 
Instance details

Defined in Data.Functor.Rep

Methods

gtabulate' :: (GRep' (f :.: g) -> a) -> (f :.: g) a

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

Defined in Data.Functor.Field

Methods

gtabulate :: (Field (f :.: g) -> r) -> (f :.: g) r Source #

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

Defined in Data.Functor.Field

Methods

gfieldPaths :: ([PathComponent] -> r) -> (f :.: g) r Source #

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

Defined in Data.Functor.Update

Methods

gsetters :: ((forall a. (a -> a) -> (f :.: g) a -> (f :.: g) a) -> r) -> (f :.: g) r Source #

Eq (f (g p)) => Eq ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :.: g) p -> (f :.: g) p -> Bool #

(/=) :: (f :.: g) p -> (f :.: g) p -> Bool #

Ord (f (g p)) => Ord ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :.: g) p -> (f :.: g) p -> Ordering #

(<) :: (f :.: g) p -> (f :.: g) p -> Bool #

(<=) :: (f :.: g) p -> (f :.: g) p -> Bool #

(>) :: (f :.: g) p -> (f :.: g) p -> Bool #

(>=) :: (f :.: g) p -> (f :.: g) p -> Bool #

max :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

min :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

Read (f (g p)) => Read ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :.: g) p) #

readList :: ReadS [(f :.: g) p] #

readPrec :: ReadPrec ((f :.: g) p) #

readListPrec :: ReadPrec [(f :.: g) p] #

Show (f (g p)) => Show ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :.: g) p -> ShowS #

show :: (f :.: g) p -> String #

showList :: [(f :.: g) p] -> ShowS #

Generic ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x #

to :: Rep ((f :.: g) p) x -> (f :.: g) p #

Semigroup (f (g p)) => Semigroup ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p #

stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p #

Monoid (f (g p)) => Monoid ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :.: g) p #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

mconcat :: [(f :.: g) p] -> (f :.: g) p #

type Rep1 (f :.: g :: k -> Type) 
Instance details

Defined in GHC.Generics

type Rep1 (f :.: g :: k -> Type) = D1 ('MetaData ":.:" "GHC.Generics" "base" 'True) (C1 ('MetaCons "Comp1" 'PrefixI 'True) (S1 ('MetaSel ('Just "unComp1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))
type Index10 (g :.: f :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Functor.WithIndex

type Index10 (g :.: f :: (k -> Type) -> Type) = Index10 f
type Rep (f :.: g) 
Instance details

Defined in Data.Functor.Rep

type Rep (f :.: g) = (Rep f, Rep g)
type GRep' (f :.: g) 
Instance details

Defined in Data.Functor.Rep

type GRep' (f :.: g) = (WrappedRep f, GRep' g)
type Rep ((f :.: g) p) 
Instance details

Defined in GHC.Generics

type Rep ((f :.: g) p) = D1 ('MetaData ":.:" "GHC.Generics" "base" 'True) (C1 ('MetaCons "Comp1" 'PrefixI 'True) (S1 ('MetaSel ('Just "unComp1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f (g p)))))

data ((f :: k -> Type) :*: (g :: k -> Type)) (p :: k) infixr 6 #

Products: encode multiple arguments to constructors

Constructors

(f p) :*: (g p) infixr 6 

Instances

Instances details
(Constrained10 c f, Constrained10 c g) => Constrained10 (c :: k -> Constraint) (f :*: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Field

Methods

constrained10 :: (f :*: g) (Dict1 c) Source #

Generic1 (f :*: g :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

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

Methods

from1 :: forall (a :: k0). (f :*: g) a -> Rep1 (f :*: g) a #

to1 :: forall (a :: k0). Rep1 (f :*: g) a -> (f :*: g) a #

(GPortrayProduct f, GPortrayProduct g) => GPortrayProduct (f :*: g :: k -> Type) 
Instance details

Defined in Data.Portray

Methods

gportrayProduct :: forall (a :: k0). (f :*: g) a -> [FactorPortrayal Portrayal] -> [FactorPortrayal Portrayal] #

(GSemigroup f, GSemigroup g) => GSemigroup (f :*: g :: k -> Type) 
Instance details

Defined in Data.Wrapped

Methods

gsop :: forall (x :: k0). (f :*: g) x -> (f :*: g) x -> (f :*: g) x #

(GMonoid f, GMonoid g) => GMonoid (f :*: g :: k -> Type) 
Instance details

Defined in Data.Wrapped

Methods

gmempty :: forall (x :: k0). (f :*: g) x #

(GNFData arity a, GNFData arity b) => GNFData arity (a :*: b) 
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs arity a0 -> (a :*: b) a0 -> ()

(Foldable10 f, Foldable10 g) => Foldable10 (f :*: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Foldable

Methods

foldMap10 :: Monoid w => (forall (a :: k0). m a -> w) -> (f :*: g) m -> w Source #

(Functor10 f, Functor10 g) => Functor10 (f :*: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Functor

Methods

fmap10 :: (forall (a :: k0). m a -> n a) -> (f :*: g) m -> (f :*: g) n Source #

(Applicative10 f, Applicative10 g) => Applicative10 (f :*: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Applicative

Methods

pure10 :: (forall (a :: k0). m a) -> (f :*: g) m Source #

(<*>!) :: forall (m :: k0 -> Type) (n :: k0 -> Type). (f :*: g) (m :->: n) -> (f :*: g) m -> (f :*: g) n Source #

liftA210 :: (forall (a :: k0). m a -> n a -> o a) -> (f :*: g) m -> (f :*: g) n -> (f :*: g) o Source #

(Traversable10 f, Traversable10 g) => Traversable10 (f :*: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Traversable

Methods

mapTraverse10 :: forall f0 m n r. Applicative f0 => ((f :*: g) n -> r) -> (forall (a :: k0). m a -> f0 (n a)) -> (f :*: g) m -> f0 r Source #

(GFieldPaths10 f, GFieldPaths10 g) => GFieldPaths10 (f :*: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Field

Methods

gfieldPaths10 :: (forall (a :: k0). [PathComponent] -> r a) -> (f :*: g) r Source #

(GTabulate10 f, GTabulate10 g) => GTabulate10 (f :*: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Representable

Methods

gtabulate10 :: (forall (a :: k0). Field10 (f :*: g) a -> r a) -> (f :*: g) r Source #

(GUpdate10 f, GUpdate10 g) => GUpdate10 (f :*: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Update

Methods

gsetters10 :: (forall (a :: k0). (forall (m :: k0 -> Type). (m a -> m a) -> (f :*: g) m -> (f :*: g) m) -> r a) -> (f :*: g) r Source #

(Monad f, Monad g) => Monad (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

return :: a -> (f :*: g) a #

(Functor f, Functor g) => Functor (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

(Applicative f, Applicative g) => Applicative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :*: g) a #

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

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

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

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

(Foldable f, Foldable g) => Foldable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :*: g) m -> m #

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

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

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

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

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

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

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

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

toList :: (f :*: g) a -> [a] #

null :: (f :*: g) a -> Bool #

length :: (f :*: g) a -> Int #

elem :: Eq a => a -> (f :*: g) a -> Bool #

maximum :: Ord a => (f :*: g) a -> a #

minimum :: Ord a => (f :*: g) a -> a #

sum :: Num a => (f :*: g) a -> a #

product :: Num a => (f :*: g) a -> a #

(Traversable f, Traversable g) => Traversable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

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

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

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

(Distributive a, Distributive b) => Distributive (a :*: b) 
Instance details

Defined in Data.Distributive

Methods

distribute :: Functor f => f ((a :*: b) a0) -> (a :*: b) (f a0) #

collect :: Functor f => (a0 -> (a :*: b) b0) -> f a0 -> (a :*: b) (f b0) #

distributeM :: Monad m => m ((a :*: b) a0) -> (a :*: b) (m a0) #

collectM :: Monad m => (a0 -> (a :*: b) b0) -> m a0 -> (a :*: b) (m b0) #

(Contravariant f, Contravariant g) => Contravariant (f :*: g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

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

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

(Representable f, Representable g) => Representable (f :*: g) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (f :*: g) #

Methods

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

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

(Alternative f, Alternative g) => Alternative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :*: g) a #

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

some :: (f :*: g) a -> (f :*: g) [a] #

many :: (f :*: g) a -> (f :*: g) [a] #

(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: (f :*: g) a #

mplus :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

(GDefault a, GDefault b) => GDefault (a :*: b) 
Instance details

Defined in Data.Default.Class

Methods

gdef :: (a :*: b) a0

(GDiffCtor f, GDiffCtor g) => GDiffCtor (f :*: g) 
Instance details

Defined in Data.Portray.Diff

Methods

gdiffCtor :: (f :*: g) x -> (f :*: g) x -> (Any, DList Portrayal)

(GDiffRecord f, GDiffRecord g) => GDiffRecord (f :*: g) 
Instance details

Defined in Data.Portray.Diff

Methods

gdiffRecord :: (f :*: g) x -> (f :*: g) x -> DList (FactorPortrayal Portrayal)

(GIndex f, GIndex g) => GIndex (f :*: g) 
Instance details

Defined in Data.Functor.Rep

Methods

gindex' :: (f :*: g) a -> GRep' (f :*: g) -> a

(GTabulate f, GTabulate g) => GTabulate (f :*: g) 
Instance details

Defined in Data.Functor.Rep

Methods

gtabulate' :: (GRep' (f :*: g) -> a) -> (f :*: g) a

(GTabulate f, GTabulate g) => GTabulate (f :*: g) Source # 
Instance details

Defined in Data.Functor.Field

Methods

gtabulate :: (Field (f :*: g) -> r) -> (f :*: g) r Source #

(GFieldPaths f, GFieldPaths g) => GFieldPaths (f :*: g) Source # 
Instance details

Defined in Data.Functor.Field

Methods

gfieldPaths :: ([PathComponent] -> r) -> (f :*: g) r Source #

(GUpdate f, GUpdate g) => GUpdate (f :*: g) Source # 
Instance details

Defined in Data.Functor.Update

Methods

gsetters :: ((forall a. (a -> a) -> (f :*: g) a -> (f :*: g) a) -> r) -> (f :*: g) r Source #

(Eq (f p), Eq (g p)) => Eq ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :*: g) p -> (f :*: g) p -> Bool #

(/=) :: (f :*: g) p -> (f :*: g) p -> Bool #

(Ord (f p), Ord (g p)) => Ord ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :*: g) p -> (f :*: g) p -> Ordering #

(<) :: (f :*: g) p -> (f :*: g) p -> Bool #

(<=) :: (f :*: g) p -> (f :*: g) p -> Bool #

(>) :: (f :*: g) p -> (f :*: g) p -> Bool #

(>=) :: (f :*: g) p -> (f :*: g) p -> Bool #

max :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

min :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

(Read (f p), Read (g p)) => Read ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :*: g) p) #

readList :: ReadS [(f :*: g) p] #

readPrec :: ReadPrec ((f :*: g) p) #

readListPrec :: ReadPrec [(f :*: g) p] #

(Show (f p), Show (g p)) => Show ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :*: g) p -> ShowS #

show :: (f :*: g) p -> String #

showList :: [(f :*: g) p] -> ShowS #

Generic ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x #

to :: Rep ((f :*: g) p) x -> (f :*: g) p #

(Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p #

stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p #

(Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :*: g) p #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

mconcat :: [(f :*: g) p] -> (f :*: g) p #

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

Defined in GHC.Generics

type Rep (f :*: g) 
Instance details

Defined in Data.Functor.Rep

type Rep (f :*: g) = Either (Rep f) (Rep g)
type GRep' (f :*: g) 
Instance details

Defined in Data.Functor.Rep

type GRep' (f :*: g) = Either (GRep' f) (GRep' g)
type Rep ((f :*: g) p) 
Instance details

Defined in GHC.Generics

data ((f :: k -> Type) :+: (g :: k -> Type)) (p :: k) infixr 5 #

Sums: encode choice between constructors

Constructors

L1 (f p) 
R1 (g p) 

Instances

Instances details
Generic1 (f :+: g :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :+: g) :: k -> Type #

Methods

from1 :: forall (a :: k0). (f :+: g) a -> Rep1 (f :+: g) a #

to1 :: forall (a :: k0). Rep1 (f :+: g) a -> (f :+: g) a #

(GPortray f, GPortray g) => GPortray (f :+: g :: k -> Type) 
Instance details

Defined in Data.Portray

Methods

gportray :: forall (a :: k0). (f :+: g) a -> Portrayal #

(GNFData arity a, GNFData arity b) => GNFData arity (a :+: b) 
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs arity a0 -> (a :+: b) a0 -> ()

(Portray a, GDiff a f, GDiff a g) => GDiff a (f :+: g) 
Instance details

Defined in Data.Portray.Diff

Methods

gdiff :: a -> a -> (f :+: g) x -> (f :+: g) x -> Maybe Portrayal

(GSum arity a, GSum arity b) => GSum arity (a :+: b) 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

hashSum :: HashArgs arity a0 -> Int -> Int -> (a :+: b) a0 -> Int

(Foldable10 f, Foldable10 g) => Foldable10 (f :+: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Foldable

Methods

foldMap10 :: Monoid w => (forall (a :: k0). m a -> w) -> (f :+: g) m -> w Source #

(Functor10 f, Functor10 g) => Functor10 (f :+: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Functor

Methods

fmap10 :: (forall (a :: k0). m a -> n a) -> (f :+: g) m -> (f :+: g) n Source #

(Traversable10 f, Traversable10 g) => Traversable10 (f :+: g :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Ten.Traversable

Methods

mapTraverse10 :: forall f0 m n r. Applicative f0 => ((f :+: g) n -> r) -> (forall (a :: k0). m a -> f0 (n a)) -> (f :+: g) m -> f0 r Source #

(Functor f, Functor g) => Functor (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

(Foldable f, Foldable g) => Foldable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :+: g) m -> m #

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

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

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

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

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

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

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

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

toList :: (f :+: g) a -> [a] #

null :: (f :+: g) a -> Bool #

length :: (f :+: g) a -> Int #

elem :: Eq a => a -> (f :+: g) a -> Bool #

maximum :: Ord a => (f :+: g) a -> a #

minimum :: Ord a => (f :+: g) a -> a #

sum :: Num a => (f :+: g) a -> a #

product :: Num a => (f :+: g) a -> a #

(Traversable f, Traversable g) => Traversable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

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

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

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

(Contravariant f, Contravariant g) => Contravariant (f :+: g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

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

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

(SumSize a, SumSize b) => SumSize (a :+: b) 
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

sumSize :: Tagged (a :+: b)

(GSumGet a, GSumGet b) => GSumGet (a :+: b) 
Instance details

Defined in Data.Binary.Generic

Methods

getSum :: (Ord word, Num word, Bits word) => word -> word -> Get ((a :+: b) a0)

(SumSize a, SumSize b) => SumSize (a :+: b) 
Instance details

Defined in Data.Binary.Generic

Methods

sumSize :: Tagged (a :+: b) Word64

(GSumPut a, GSumPut b) => GSumPut (a :+: b) 
Instance details

Defined in Data.Binary.Generic

Methods

putSum :: (Num w, Bits w, Binary w) => w -> w -> (a :+: b) a0 -> Put

(Eq (f p), Eq (g p)) => Eq ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :+: g) p -> (f :+: g) p -> Bool #

(/=) :: (f :+: g) p -> (f :+: g) p -> Bool #

(Ord (f p), Ord (g p)) => Ord ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :+: g) p -> (f :+: g) p -> Ordering #

(<) :: (f :+: g) p -> (f :+: g) p -> Bool #

(<=) :: (f :+: g) p -> (f :+: g) p -> Bool #

(>) :: (f :+: g) p -> (f :+: g) p -> Bool #

(>=) :: (f :+: g) p -> (f :+: g) p -> Bool #

max :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p #

min :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p #

(Read (f p), Read (g p)) => Read ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :+: g) p) #

readList :: ReadS [(f :+: g) p] #

readPrec :: ReadPrec ((f :+: g) p) #

readListPrec :: ReadPrec [(f :+: g) p] #

(Show (f p), Show (g p)) => Show ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :+: g) p -> ShowS #

show :: (f :+: g) p -> String #

showList :: [(f :+: g) p] -> ShowS #

Generic ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x #

to :: Rep ((f :+: g) p) x -> (f :+: g) p #

type Rep1 (f :+: g :: k -> Type) 
Instance details

Defined in GHC.Generics

type Rep ((f :+: g) p) 
Instance details

Defined in GHC.Generics