deep-transformations
Safe HaskellSafe-Inferred
LanguageHaskell2010

Transformation.Deep

Description

Type classes Functor, Foldable, and Traversable that correspond to the standard type classes of the same name, but applying the given transformation to every descendant of the given tree node. The corresponding classes in the Transformation.Shallow module operate only on the immediate children, while those from the Transformation.Full module include the argument node itself.

Synopsis

Documentation

class (Transformation t, Functor (g (Domain t))) => Functor t g where Source #

Like Transformation.Shallow.Functor except it maps all descendants and not only immediate children

Methods

(<$>) :: t -> g (Domain t) (Domain t) -> g (Codomain t) (Codomain t) infixl 4 Source #

Instances

Instances details
Functor t g => Functor t (Only g) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<$>) :: t -> Only g (Domain t) (Domain t) -> Only g (Codomain t) (Codomain t) Source #

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

Defined in Transformation.Deep

Methods

(<$>) :: t -> Nest f g (Domain t) (Domain t) -> Nest f g (Codomain t) (Codomain t) Source #

(Functor t g, Functor t h) => Functor t (Product g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<$>) :: t -> Product g h (Domain t) (Domain t) -> Product g h (Codomain t) (Codomain t) Source #

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

Defined in Transformation.Deep

Methods

(<$>) :: t -> Sum g h (Domain t) (Domain t) -> Sum g h (Codomain t) (Codomain t) Source #

class (Transformation t, Foldable (g (Domain t))) => Foldable t g where Source #

Like Transformation.Shallow.Foldable except it folds all descendants and not only immediate children

Methods

foldMap :: (Codomain t ~ Const m, Monoid m) => t -> g (Domain t) (Domain t) -> m Source #

Instances

Instances details
Foldable t g => Foldable t (Only g) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: (Codomain t ~ Const m, Monoid m) => t -> Only g (Domain t) (Domain t) -> m Source #

(Foldable f, Foldable t g) => Foldable t (Nest f g) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: (Codomain t ~ Const m, Monoid m) => t -> Nest f g (Domain t) (Domain t) -> m Source #

(Foldable t g, Foldable t h) => Foldable t (Product g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: (Codomain t ~ Const m, Monoid m) => t -> Product g h (Domain t) (Domain t) -> m Source #

(Foldable t g, Foldable t h, Codomain t ~ (Const m :: Type -> Type)) => Foldable t (Sum g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: (Codomain t ~ Const m, Monoid m) => t -> Sum g h (Domain t) (Domain t) -> m Source #

class (Transformation t, Traversable (g (Domain t))) => Traversable t g where Source #

Like Transformation.Shallow.Traversable except it folds all descendants and not only immediate children

Methods

traverse :: Codomain t ~ Compose m f => t -> g (Domain t) (Domain t) -> m (g f f) Source #

Instances

Instances details
(Traversable t g, Codomain t ~ Compose m f, Functor m) => Traversable t (Only g) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: forall m (f :: Type -> Type). Codomain t ~ Compose m f => t -> Only g (Domain t) (Domain t) -> m (Only g f f) Source #

(Traversable f, Traversable t g, Codomain t ~ Compose m f, Applicative m) => Traversable t (Nest f g) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: forall m (f0 :: Type -> Type). Codomain t ~ Compose m f0 => t -> Nest f g (Domain t) (Domain t) -> m (Nest f g f0 f0) Source #

(Traversable t g, Traversable t h, Codomain t ~ Compose m f, Applicative m) => Traversable t (Product g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: forall m (f :: Type -> Type). Codomain t ~ Compose m f => t -> Product g h (Domain t) (Domain t) -> m (Product g h f f) Source #

(Traversable t g, Traversable t h, Codomain t ~ Compose m f, Applicative m) => Traversable t (Sum g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: forall m (f :: Type -> Type). Codomain t ~ Compose m f => t -> Sum g h (Domain t) (Domain t) -> m (Sum g h f f) Source #

newtype Only g (d :: Type -> Type) (s :: Type -> Type) Source #

A tuple of only one element

Constructors

Only 

Fields

Instances

Instances details
Foldable t g => Foldable t (Only g) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: (Codomain t ~ Const m, Monoid m) => t -> Only g (Domain t) (Domain t) -> m Source #

Functor t g => Functor t (Only g) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<$>) :: t -> Only g (Domain t) (Domain t) -> Only g (Codomain t) (Codomain t) Source #

(Traversable t g, Codomain t ~ Compose m f, Functor m) => Traversable t (Only g) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: forall m (f :: Type -> Type). Codomain t ~ Compose m f => t -> Only g (Domain t) (Domain t) -> m (Only g f f) Source #

Applicative (Only g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

pure :: (forall (a :: k). f a) -> Only g d f #

Apply (Only g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<*>) :: forall (p :: k -> Type) (q :: k -> Type). Only g d (p ~> q) -> Only g d p -> Only g d q #

liftA2 :: (forall (a :: k). p a -> q a -> r a) -> Only g d p -> Only g d q -> Only g d r #

liftA3 :: (forall (a :: k). p a -> q a -> r a -> s a) -> Only g d p -> Only g d q -> Only g d r -> Only g d s #

Distributive (Only g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

collect :: forall p a (q :: k1 -> Type). Functor p => (a -> Only g d q) -> p a -> Only g d (Compose p q) #

distribute :: forall p (q :: k1 -> Type). Functor p => p (Only g d q) -> Only g d (Compose p q) #

cotraverse :: Functor m => (forall (a :: k1). m (p a) -> q a) -> m (Only g d p) -> Only g d q #

DistributiveTraversable (Only g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

collectTraversable :: forall f1 a (f2 :: k -> Type). Traversable f1 => (a -> Only g d f2) -> f1 a -> Only g d (Compose f1 f2) #

distributeTraversable :: forall f1 (f2 :: k -> Type). Traversable f1 => f1 (Only g d f2) -> Only g d (Compose f1 f2) #

cotraverseTraversable :: Traversable f1 => (forall (x :: k). f1 (f2 x) -> f x) -> f1 (Only g d f2) -> Only g d f #

Foldable (Only g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: Monoid m => (forall (a :: k). p a -> m) -> Only g d p -> m #

Functor (Only g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<$>) :: (forall (a :: k). p a -> q a) -> Only g d p -> Only g d q #

Traversable (Only g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: Applicative m => (forall (a :: k). p a -> m (q a)) -> Only g d p -> m (Only g d q) #

sequence :: forall m (p :: k -> Type). Applicative m => Only g d (Compose m p) -> m (Only g d p) #

(Typeable s, Typeable d, Typeable g, Data (s (g d d))) => Data (Only g d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

gfoldl :: (forall d0 b. Data d0 => c (d0 -> b) -> d0 -> c b) -> (forall g0. g0 -> c g0) -> Only g d s -> c (Only g d s) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Only g d s) #

toConstr :: Only g d s -> Constr #

dataTypeOf :: Only g d s -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c (t d0)) -> Maybe (c (Only g d s)) #

dataCast2 :: Typeable t => (forall d0 e. (Data d0, Data e) => c (t d0 e)) -> Maybe (c (Only g d s)) #

gmapT :: (forall b. Data b => b -> b) -> Only g d s -> Only g d s #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Only g d s -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Only g d s -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> Only g d s -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> Only g d s -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> Only g d s -> m (Only g d s) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Only g d s -> m (Only g d s) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Only g d s -> m (Only g d s) #

Show (s (g d d)) => Show (Only g d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

showsPrec :: Int -> Only g d s -> ShowS #

show :: Only g d s -> String #

showList :: [Only g d s] -> ShowS #

Eq (s (g d d)) => Eq (Only g d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

(==) :: Only g d s -> Only g d s -> Bool #

(/=) :: Only g d s -> Only g d s -> Bool #

Ord (s (g d d)) => Ord (Only g d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

compare :: Only g d s -> Only g d s -> Ordering #

(<) :: Only g d s -> Only g d s -> Bool #

(<=) :: Only g d s -> Only g d s -> Bool #

(>) :: Only g d s -> Only g d s -> Bool #

(>=) :: Only g d s -> Only g d s -> Bool #

max :: Only g d s -> Only g d s -> Only g d s #

min :: Only g d s -> Only g d s -> Only g d s #

newtype Nest (f :: Type -> Type) g (d :: Type -> Type) (s :: Type -> Type) Source #

Compose a regular type constructor with a data type with two type constructor parameters

Constructors

Nest 

Fields

Instances

Instances details
(Foldable f, Foldable t g) => Foldable t (Nest f g) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: (Codomain t ~ Const m, Monoid m) => t -> Nest f g (Domain t) (Domain t) -> m Source #

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

Defined in Transformation.Deep

Methods

(<$>) :: t -> Nest f g (Domain t) (Domain t) -> Nest f g (Codomain t) (Codomain t) Source #

(Traversable f, Traversable t g, Codomain t ~ Compose m f, Applicative m) => Traversable t (Nest f g) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: forall m (f0 :: Type -> Type). Codomain t ~ Compose m f0 => t -> Nest f g (Domain t) (Domain t) -> m (Nest f g f0 f0) Source #

(Applicative f, Applicative (g d)) => Applicative (Nest f g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

pure :: (forall (a :: k). f0 a) -> Nest f g d f0 #

(Applicative f, Apply (g d)) => Apply (Nest f g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<*>) :: forall (p :: k -> Type) (q :: k -> Type). Nest f g d (p ~> q) -> Nest f g d p -> Nest f g d q #

liftA2 :: (forall (a :: k). p a -> q a -> r a) -> Nest f g d p -> Nest f g d q -> Nest f g d r #

liftA3 :: (forall (a :: k). p a -> q a -> r a -> s a) -> Nest f g d p -> Nest f g d q -> Nest f g d r -> Nest f g d s #

(Foldable f, Foldable (g d)) => Foldable (Nest f g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: Monoid m => (forall (a :: k). p a -> m) -> Nest f g d p -> m #

(Functor f, Functor (g d)) => Functor (Nest f g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<$>) :: (forall (a :: k). p a -> q a) -> Nest f g d p -> Nest f g d q #

(Traversable f, Traversable (g d)) => Traversable (Nest f g d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: Applicative m => (forall (a :: k). p a -> m (q a)) -> Nest f g d p -> m (Nest f g d q) #

sequence :: forall m (p :: k -> Type). Applicative m => Nest f g d (Compose m p) -> m (Nest f g d p) #

(Typeable s, Typeable d, Typeable f, Typeable g, Data (f (g d s))) => Data (Nest f g d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

gfoldl :: (forall d0 b. Data d0 => c (d0 -> b) -> d0 -> c b) -> (forall g0. g0 -> c g0) -> Nest f g d s -> c (Nest f g d s) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Nest f g d s) #

toConstr :: Nest f g d s -> Constr #

dataTypeOf :: Nest f g d s -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c (t d0)) -> Maybe (c (Nest f g d s)) #

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

gmapT :: (forall b. Data b => b -> b) -> Nest f g d s -> Nest f g d s #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Nest f g d s -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Nest f g d s -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> Nest f g d s -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> Nest f g d s -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> Nest f g d s -> m (Nest f g d s) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Nest f g d s -> m (Nest f g d s) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Nest f g d s -> m (Nest f g d s) #

Show (f (g d s)) => Show (Nest f g d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

showsPrec :: Int -> Nest f g d s -> ShowS #

show :: Nest f g d s -> String #

showList :: [Nest f g d s] -> ShowS #

Eq (f (g d s)) => Eq (Nest f g d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

(==) :: Nest f g d s -> Nest f g d s -> Bool #

(/=) :: Nest f g d s -> Nest f g d s -> Bool #

Ord (f (g d s)) => Ord (Nest f g d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

compare :: Nest f g d s -> Nest f g d s -> Ordering #

(<) :: Nest f g d s -> Nest f g d s -> Bool #

(<=) :: Nest f g d s -> Nest f g d s -> Bool #

(>) :: Nest f g d s -> Nest f g d s -> Bool #

(>=) :: Nest f g d s -> Nest f g d s -> Bool #

max :: Nest f g d s -> Nest f g d s -> Nest f g d s #

min :: Nest f g d s -> Nest f g d s -> Nest f g d s #

data Product g h (d :: Type -> Type) (s :: Type -> Type) Source #

Like Product for data types with two type constructor parameters

Constructors

Pair 

Fields

Instances

Instances details
(Foldable t g, Foldable t h) => Foldable t (Product g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: (Codomain t ~ Const m, Monoid m) => t -> Product g h (Domain t) (Domain t) -> m Source #

(Functor t g, Functor t h) => Functor t (Product g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<$>) :: t -> Product g h (Domain t) (Domain t) -> Product g h (Codomain t) (Codomain t) Source #

(Traversable t g, Traversable t h, Codomain t ~ Compose m f, Applicative m) => Traversable t (Product g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: forall m (f :: Type -> Type). Codomain t ~ Compose m f => t -> Product g h (Domain t) (Domain t) -> m (Product g h f f) Source #

(Applicative (g d), Applicative (h d)) => Applicative (Product g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

pure :: (forall (a :: k). f a) -> Product g h d f #

(Apply (g d), Apply (h d)) => Apply (Product g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<*>) :: forall (p :: k -> Type) (q :: k -> Type). Product g h d (p ~> q) -> Product g h d p -> Product g h d q #

liftA2 :: (forall (a :: k). p a -> q a -> r a) -> Product g h d p -> Product g h d q -> Product g h d r #

liftA3 :: (forall (a :: k). p a -> q a -> r a -> s a) -> Product g h d p -> Product g h d q -> Product g h d r -> Product g h d s #

(Distributive (g d), Distributive (h d)) => Distributive (Product g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

collect :: forall p a (q :: k1 -> Type). Functor p => (a -> Product g h d q) -> p a -> Product g h d (Compose p q) #

distribute :: forall p (q :: k1 -> Type). Functor p => p (Product g h d q) -> Product g h d (Compose p q) #

cotraverse :: Functor m => (forall (a :: k1). m (p a) -> q a) -> m (Product g h d p) -> Product g h d q #

(Distributive (g d), Distributive (h d)) => DistributiveTraversable (Product g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

collectTraversable :: forall f1 a (f2 :: k -> Type). Traversable f1 => (a -> Product g h d f2) -> f1 a -> Product g h d (Compose f1 f2) #

distributeTraversable :: forall f1 (f2 :: k -> Type). Traversable f1 => f1 (Product g h d f2) -> Product g h d (Compose f1 f2) #

cotraverseTraversable :: Traversable f1 => (forall (x :: k). f1 (f2 x) -> f x) -> f1 (Product g h d f2) -> Product g h d f #

(Foldable (g d), Foldable (h d)) => Foldable (Product g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: Monoid m => (forall (a :: k). p a -> m) -> Product g h d p -> m #

(Functor (g d), Functor (h d)) => Functor (Product g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<$>) :: (forall (a :: k). p a -> q a) -> Product g h d p -> Product g h d q #

(Traversable (g d), Traversable (h d)) => Traversable (Product g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: Applicative m => (forall (a :: k). p a -> m (q a)) -> Product g h d p -> m (Product g h d q) #

sequence :: forall m (p :: k -> Type). Applicative m => Product g h d (Compose m p) -> m (Product g h d p) #

(Typeable d, Typeable s, Typeable g1, Typeable g2, Data (g1 d s), Data (g2 d s)) => Data (Product g1 g2 d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

gfoldl :: (forall d0 b. Data d0 => c (d0 -> b) -> d0 -> c b) -> (forall g. g -> c g) -> Product g1 g2 d s -> c (Product g1 g2 d s) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Product g1 g2 d s) #

toConstr :: Product g1 g2 d s -> Constr #

dataTypeOf :: Product g1 g2 d s -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c (t d0)) -> Maybe (c (Product g1 g2 d s)) #

dataCast2 :: Typeable t => (forall d0 e. (Data d0, Data e) => c (t d0 e)) -> Maybe (c (Product g1 g2 d s)) #

gmapT :: (forall b. Data b => b -> b) -> Product g1 g2 d s -> Product g1 g2 d s #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Product g1 g2 d s -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Product g1 g2 d s -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> Product g1 g2 d s -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> Product g1 g2 d s -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> Product g1 g2 d s -> m (Product g1 g2 d s) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Product g1 g2 d s -> m (Product g1 g2 d s) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Product g1 g2 d s -> m (Product g1 g2 d s) #

(Show (g1 d s), Show (g2 d s)) => Show (Product g1 g2 d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

showsPrec :: Int -> Product g1 g2 d s -> ShowS #

show :: Product g1 g2 d s -> String #

showList :: [Product g1 g2 d s] -> ShowS #

(Eq (g d s), Eq (h d s)) => Eq (Product g h d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

(==) :: Product g h d s -> Product g h d s -> Bool #

(/=) :: Product g h d s -> Product g h d s -> Bool #

(Ord (g d s), Ord (h d s)) => Ord (Product g h d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

compare :: Product g h d s -> Product g h d s -> Ordering #

(<) :: Product g h d s -> Product g h d s -> Bool #

(<=) :: Product g h d s -> Product g h d s -> Bool #

(>) :: Product g h d s -> Product g h d s -> Bool #

(>=) :: Product g h d s -> Product g h d s -> Bool #

max :: Product g h d s -> Product g h d s -> Product g h d s #

min :: Product g h d s -> Product g h d s -> Product g h d s #

data Sum g h (d :: Type -> Type) (s :: Type -> Type) Source #

Like Sum for data types with two type constructor parameters

Constructors

InL (g d s) 
InR (h d s) 

Instances

Instances details
(Foldable t g, Foldable t h, Codomain t ~ (Const m :: Type -> Type)) => Foldable t (Sum g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: (Codomain t ~ Const m, Monoid m) => t -> Sum g h (Domain t) (Domain t) -> m Source #

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

Defined in Transformation.Deep

Methods

(<$>) :: t -> Sum g h (Domain t) (Domain t) -> Sum g h (Codomain t) (Codomain t) Source #

(Traversable t g, Traversable t h, Codomain t ~ Compose m f, Applicative m) => Traversable t (Sum g h) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: forall m (f :: Type -> Type). Codomain t ~ Compose m f => t -> Sum g h (Domain t) (Domain t) -> m (Sum g h f f) Source #

(Foldable (g d), Foldable (h d)) => Foldable (Sum g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

foldMap :: Monoid m => (forall (a :: k). p a -> m) -> Sum g h d p -> m #

(Functor (g d), Functor (h d)) => Functor (Sum g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

(<$>) :: (forall (a :: k). p a -> q a) -> Sum g h d p -> Sum g h d q #

(Traversable (g d), Traversable (h d)) => Traversable (Sum g h d :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Transformation.Deep

Methods

traverse :: Applicative m => (forall (a :: k). p a -> m (q a)) -> Sum g h d p -> m (Sum g h d q) #

sequence :: forall m (p :: k -> Type). Applicative m => Sum g h d (Compose m p) -> m (Sum g h d p) #

(Typeable d, Typeable s, Typeable g1, Typeable g2, Data (g1 d s), Data (g2 d s)) => Data (Sum g1 g2 d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

gfoldl :: (forall d0 b. Data d0 => c (d0 -> b) -> d0 -> c b) -> (forall g. g -> c g) -> Sum g1 g2 d s -> c (Sum g1 g2 d s) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sum g1 g2 d s) #

toConstr :: Sum g1 g2 d s -> Constr #

dataTypeOf :: Sum g1 g2 d s -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c (t d0)) -> Maybe (c (Sum g1 g2 d s)) #

dataCast2 :: Typeable t => (forall d0 e. (Data d0, Data e) => c (t d0 e)) -> Maybe (c (Sum g1 g2 d s)) #

gmapT :: (forall b. Data b => b -> b) -> Sum g1 g2 d s -> Sum g1 g2 d s #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Sum g1 g2 d s -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Sum g1 g2 d s -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> Sum g1 g2 d s -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> Sum g1 g2 d s -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> Sum g1 g2 d s -> m (Sum g1 g2 d s) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Sum g1 g2 d s -> m (Sum g1 g2 d s) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Sum g1 g2 d s -> m (Sum g1 g2 d s) #

(Show (g1 d s), Show (g2 d s)) => Show (Sum g1 g2 d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

showsPrec :: Int -> Sum g1 g2 d s -> ShowS #

show :: Sum g1 g2 d s -> String #

showList :: [Sum g1 g2 d s] -> ShowS #

(Eq (g d s), Eq (h d s)) => Eq (Sum g h d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

(==) :: Sum g h d s -> Sum g h d s -> Bool #

(/=) :: Sum g h d s -> Sum g h d s -> Bool #

(Ord (g d s), Ord (h d s)) => Ord (Sum g h d s) Source # 
Instance details

Defined in Transformation.Deep

Methods

compare :: Sum g h d s -> Sum g h d s -> Ordering #

(<) :: Sum g h d s -> Sum g h d s -> Bool #

(<=) :: Sum g h d s -> Sum g h d s -> Bool #

(>) :: Sum g h d s -> Sum g h d s -> Bool #

(>=) :: Sum g h d s -> Sum g h d s -> Bool #

max :: Sum g h d s -> Sum g h d s -> Sum g h d s #

min :: Sum g h d s -> Sum g h d s -> Sum g h d s #

fmap :: Functor t g => t -> g (Domain t) (Domain t) -> g (Codomain t) (Codomain t) Source #

Alphabetical synonym for <$>

eitherFromSum :: Sum g h d s -> Either (g d s) (h d s) Source #

Equivalent of either