distributors-0.3.0.0: Unifying Parsers, Printers & Grammars
Copyright(C) 2026 - Eitan Chatav
LicenseBSD-style (see the file LICENSE)
MaintainerEitan Chatav <eitan.chatav@gmail.com>
Stabilityprovisional
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Profunctor.Distributor

Description

 
Synopsis

Distributor

class Monoidal p => Distributor p where Source #

A Distributor, or lax distributive profunctor, respects distributive category structure, that is nilary and binary products and coproducts, (), (,), Void and Either. It has zero zeroP and sum >+< lax monoidal structure morphisms.

In addition to the product laws for Monoidal, we have sum laws for Distributor.

Laws:

>>> let lunit = dimap (either absurd id) Right
>>> let runit = dimap (either id absurd) Left
>>> :{
let assoc = dimap
      (either (Left . Left) (either (Left . Right) Right))
      (either (either Left (Right . Left)) (Right . Right))
:}
zeroP >+< p = lunit p
p >+< zeroP = runit p
p >+< q >+< r = assoc ((p >+< q) >+< r)
dimap (f >+< g) (h >+< i) (p >+< q) = dimap f h p >+< dimap g i q

Minimal complete definition

Nothing

Methods

zeroP :: p Void Void Source #

The zero structure morphism of a Distributor.

zeroP has a default for Alternator.

zeroP = empty

default zeroP :: Alternator p => p Void Void Source #

(>+<) :: p a b -> p c d -> p (Either a c) (Either b d) infixr 3 Source #

The sum structure morphism of a Distributor.

>+< has a default for Alternator.

x >+< y = alternate (Left x) <|> alternate (Right y)

default (>+<) :: Alternator p => p a b -> p c d -> p (Either a c) (Either b d) Source #

optionalP :: p a b -> p (Maybe a) (Maybe b) Source #

One or none.

manyP :: p a b -> p [a] [b] Source #

Zero or more.

Instances

Instances details
(ArrowZero p, ArrowChoice p) => Distributor (WrappedArrow p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Monad m => Distributor (Kleisli m) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Kleisli m Void Void Source #

(>+<) :: Kleisli m a b -> Kleisli m c d -> Kleisli m (Either a c) (Either b d) Source #

optionalP :: Kleisli m a b -> Kleisli m (Maybe a) (Maybe b) Source #

manyP :: Kleisli m a b -> Kleisli m [a] [b] Source #

KleeneStarAlgebra k => Distributor (Grammor k) Source # 
Instance details

Defined in Data.Profunctor.Grammar

Methods

zeroP :: Grammor k Void Void Source #

(>+<) :: Grammor k a b -> Grammor k c d -> Grammor k (Either a c) (Either b d) Source #

optionalP :: Grammor k a b -> Grammor k (Maybe a) (Maybe b) Source #

manyP :: Grammor k a b -> Grammor k [a] [b] Source #

Distributor p => Distributor (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Coyoneda p Void Void Source #

(>+<) :: Coyoneda p a b -> Coyoneda p c d -> Coyoneda p (Either a c) (Either b d) Source #

optionalP :: Coyoneda p a b -> Coyoneda p (Maybe a) (Maybe b) Source #

manyP :: Coyoneda p a b -> Coyoneda p [a] [b] Source #

Distributor p => Distributor (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Yoneda p Void Void Source #

(>+<) :: Yoneda p a b -> Yoneda p c d -> Yoneda p (Either a c) (Either b d) Source #

optionalP :: Yoneda p a b -> Yoneda p (Maybe a) (Maybe b) Source #

manyP :: Yoneda p a b -> Yoneda p [a] [b] Source #

Distributor (Binocular a b) Source # 
Instance details

Defined in Control.Lens.Bifocal

Methods

zeroP :: Binocular a b Void Void Source #

(>+<) :: Binocular a b a0 b0 -> Binocular a b c d -> Binocular a b (Either a0 c) (Either b0 d) Source #

optionalP :: Binocular a b a0 b0 -> Binocular a b (Maybe a0) (Maybe b0) Source #

manyP :: Binocular a b a0 b0 -> Binocular a b [a0] [b0] Source #

Distributor (Dioptrice a b) Source # 
Instance details

Defined in Control.Lens.Diopter

Methods

zeroP :: Dioptrice a b Void Void Source #

(>+<) :: Dioptrice a b a0 b0 -> Dioptrice a b c d -> Dioptrice a b (Either a0 c) (Either b0 d) Source #

optionalP :: Dioptrice a b a0 b0 -> Dioptrice a b (Maybe a0) (Maybe b0) Source #

manyP :: Dioptrice a b a0 b0 -> Dioptrice a b [a0] [b0] Source #

(Alternative m, Monad m) => Distributor (Parsor s m) Source # 
Instance details

Defined in Data.Profunctor.Grammar

Methods

zeroP :: Parsor s m Void Void Source #

(>+<) :: Parsor s m a b -> Parsor s m c d -> Parsor s m (Either a c) (Either b d) Source #

optionalP :: Parsor s m a b -> Parsor s m (Maybe a) (Maybe b) Source #

manyP :: Parsor s m a b -> Parsor s m [a] [b] Source #

Applicative f => Distributor (Printor s f) Source # 
Instance details

Defined in Data.Profunctor.Grammar

Methods

zeroP :: Printor s f Void Void Source #

(>+<) :: Printor s f a b -> Printor s f c d -> Printor s f (Either a c) (Either b d) Source #

optionalP :: Printor s f a b -> Printor s f (Maybe a) (Maybe b) Source #

manyP :: Printor s f a b -> Printor s f [a] [b] Source #

(Distributor p, Applicative f) => Distributor (WrappedPafb f p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: WrappedPafb f p Void Void Source #

(>+<) :: WrappedPafb f p a b -> WrappedPafb f p c d -> WrappedPafb f p (Either a c) (Either b d) Source #

optionalP :: WrappedPafb f p a b -> WrappedPafb f p (Maybe a) (Maybe b) Source #

manyP :: WrappedPafb f p a b -> WrappedPafb f p [a] [b] Source #

Adjunction f u => Distributor (Costar f) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Costar f Void Void Source #

(>+<) :: Costar f a b -> Costar f c d -> Costar f (Either a c) (Either b d) Source #

optionalP :: Costar f a b -> Costar f (Maybe a) (Maybe b) Source #

manyP :: Costar f a b -> Costar f [a] [b] Source #

Monoid s => Distributor (Forget s :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Forget s Void Void Source #

(>+<) :: Forget s a b -> Forget s c d -> Forget s (Either a c) (Either b d) Source #

optionalP :: Forget s a b -> Forget s (Maybe a) (Maybe b) Source #

manyP :: Forget s a b -> Forget s [a] [b] Source #

Applicative f => Distributor (Star f) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Star f Void Void Source #

(>+<) :: Star f a b -> Star f c d -> Star f (Either a c) (Either b d) Source #

optionalP :: Star f a b -> Star f (Maybe a) (Maybe b) Source #

manyP :: Star f a b -> Star f [a] [b] Source #

Distributor (->) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Void -> Void Source #

(>+<) :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

optionalP :: (a -> b) -> Maybe a -> Maybe b Source #

manyP :: (a -> b) -> [a] -> [b] Source #

Decidable f => Distributor (Clown f :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Clown f Void Void Source #

(>+<) :: Clown f a b -> Clown f c d -> Clown f (Either a c) (Either b d) Source #

optionalP :: Clown f a b -> Clown f (Maybe a) (Maybe b) Source #

manyP :: Clown f a b -> Clown f [a] [b] Source #

Alternative f => Distributor (Joker f :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Joker f Void Void Source #

(>+<) :: Joker f a b -> Joker f c d -> Joker f (Either a c) (Either b d) Source #

optionalP :: Joker f a b -> Joker f (Maybe a) (Maybe b) Source #

manyP :: Joker f a b -> Joker f [a] [b] Source #

(ArrowZero p, ArrowChoice p) => Distributor (WrappedArrow p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

(Distributor p, Distributor q) => Distributor (Product p q) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Product p q Void Void Source #

(>+<) :: Product p q a b -> Product p q c d -> Product p q (Either a c) (Either b d) Source #

optionalP :: Product p q a b -> Product p q (Maybe a) (Maybe b) Source #

manyP :: Product p q a b -> Product p q [a] [b] Source #

(Applicative f, Distributor p) => Distributor (Cayley f p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Cayley f p Void Void Source #

(>+<) :: Cayley f p a b -> Cayley f p c d -> Cayley f p (Either a c) (Either b d) Source #

optionalP :: Cayley f p a b -> Cayley f p (Maybe a) (Maybe b) Source #

manyP :: Cayley f p a b -> Cayley f p [a] [b] Source #

(Distributor p, Distributor q) => Distributor (Procompose p q) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

zeroP :: Procompose p q Void Void Source #

(>+<) :: Procompose p q a b -> Procompose p q c d -> Procompose p q (Either a c) (Either b d) Source #

optionalP :: Procompose p q a b -> Procompose p q (Maybe a) (Maybe b) Source #

manyP :: Procompose p q a b -> Procompose p q [a] [b] Source #

dialt :: Distributor p => (s -> Either a c) -> (b -> t) -> (d -> t) -> p a b -> p c d -> p s t Source #

dialt is a functionalized form of >+<.

Alternator

class (Choice p, Distributor p, forall x. Alternative (p x)) => Alternator p where Source #

The Alternator class co-extends Choice and Distributor, as well as Alternative, adding the alternate method, which is a lax monoidal structure morphism on sums.

For the case of Functors the analog of alternate can be defined without any other constraint, but the case of Profunctors turns out to be slighly more complex.

Minimal complete definition

Nothing

Methods

alternate :: Either (p a b) (p c d) -> p (Either a c) (Either b d) Source #

left' = alternate . Left
right' = alternate . Right
zeroP = empty
x >+< y = alternate (Left x) <|> alternate (Right y)

alternate has a default for Cochoice.

default alternate :: Cochoice p => Either (p a b) (p c d) -> p (Either a c) (Either b d) Source #

someP :: p a b -> p [a] [b] Source #

One or more.

Instances

Instances details
KleeneStarAlgebra k => Alternator (Grammor k) Source # 
Instance details

Defined in Data.Profunctor.Grammar

Methods

alternate :: Either (Grammor k a b) (Grammor k c d) -> Grammor k (Either a c) (Either b d) Source #

someP :: Grammor k a b -> Grammor k [a] [b] Source #

Alternator p => Alternator (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

alternate :: Either (Coyoneda p a b) (Coyoneda p c d) -> Coyoneda p (Either a c) (Either b d) Source #

someP :: Coyoneda p a b -> Coyoneda p [a] [b] Source #

Alternator p => Alternator (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

alternate :: Either (Yoneda p a b) (Yoneda p c d) -> Yoneda p (Either a c) (Either b d) Source #

someP :: Yoneda p a b -> Yoneda p [a] [b] Source #

Alternator (Binocular a b) Source # 
Instance details

Defined in Control.Lens.Bifocal

Methods

alternate :: Either (Binocular a b a0 b0) (Binocular a b c d) -> Binocular a b (Either a0 c) (Either b0 d) Source #

someP :: Binocular a b a0 b0 -> Binocular a b [a0] [b0] Source #

(Alternative m, Monad m) => Alternator (Parsor s m) Source # 
Instance details

Defined in Data.Profunctor.Grammar

Methods

alternate :: Either (Parsor s m a b) (Parsor s m c d) -> Parsor s m (Either a c) (Either b d) Source #

someP :: Parsor s m a b -> Parsor s m [a] [b] Source #

Alternative f => Alternator (Printor s f) Source # 
Instance details

Defined in Data.Profunctor.Grammar

Methods

alternate :: Either (Printor s f a b) (Printor s f c d) -> Printor s f (Either a c) (Either b d) Source #

someP :: Printor s f a b -> Printor s f [a] [b] Source #

(Alternator p, Applicative f) => Alternator (WrappedPafb f p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

alternate :: Either (WrappedPafb f p a b) (WrappedPafb f p c d) -> WrappedPafb f p (Either a c) (Either b d) Source #

someP :: WrappedPafb f p a b -> WrappedPafb f p [a] [b] Source #

choice :: (Foldable f, Alternative p) => f (p a) -> p a Source #

Combines all Alternative choices in the specified list.

option Source #

Arguments

:: Alternative p 
=> a

default value

-> p a 
-> p a 

Perform an Alternative action or return a default value.

Homogeneous

class Traversable t => Homogeneous t where Source #

A class of Homogeneous countable sums of countable products.

Minimal complete definition

Nothing

Methods

homogeneously :: Distributor p => p a b -> p (t a) (t b) Source #

Sequences actions homogeneously.

homogeneously @Maybe = optionalP
homogeneously @[] = manyP

Any Traversable & Distributive countable product can be given a default implementation for the homogeneously method.

homogeneously = ditraverse

And any user-defined homogeneous algebraic datatype has a default instance for Homogeneous, by deriving Generic1.

default homogeneously :: (Generic1 t, Homogeneous (Rep1 t), Distributor p) => p a b -> p (t a) (t b) Source #

Instances

Instances details
Homogeneous Complex Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Complex a) (Complex b) Source #

Homogeneous Identity Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Identity a) (Identity b) Source #

Homogeneous Dual Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Dual a) (Dual b) Source #

Homogeneous Product Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Product a) (Product b) Source #

Homogeneous Sum Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Sum a) (Sum b) Source #

Homogeneous Par1 Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Par1 a) (Par1 b) Source #

Homogeneous Seq Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Seq a) (Seq b) Source #

Homogeneous Tree Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Tree a) (Tree b) Source #

Homogeneous Vector Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Vector a) (Vector b) Source #

Homogeneous Maybe Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Maybe a) (Maybe b) Source #

Homogeneous List Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p [a] [b] Source #

Homogeneous (Proxy :: Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Proxy a) (Proxy b) Source #

Homogeneous (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (U1 a) (U1 b) Source #

Homogeneous (V1 :: Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (V1 a) (V1 b) Source #

Homogeneous (Const Void :: Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Const Void a) (Const Void b) Source #

Homogeneous (Const () :: Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Const () a) (Const () b) Source #

Homogeneous f => Homogeneous (Rec1 f) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Rec1 f a) (Rec1 f b) Source #

Homogeneous (Tagged s) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Tagged s a) (Tagged s b) Source #

(Homogeneous s, Homogeneous t) => Homogeneous (Product s t) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Product s t a) (Product s t b) Source #

(Homogeneous s, Homogeneous t) => Homogeneous (Sum s t) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Sum s t a) (Sum s t b) Source #

(Homogeneous s, Homogeneous t) => Homogeneous (s :*: t) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p ((s :*: t) a) ((s :*: t) b) Source #

(Homogeneous s, Homogeneous t) => Homogeneous (s :+: t) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p ((s :+: t) a) ((s :+: t) b) Source #

Homogeneous (K1 i Void :: Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (K1 i Void a) (K1 i Void b) Source #

Homogeneous (K1 i () :: Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (K1 i () a) (K1 i () b) Source #

(Homogeneous s, Homogeneous t) => Homogeneous (Compose s t) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (Compose s t a) (Compose s t b) Source #

(Homogeneous s, Homogeneous t) => Homogeneous (s :.: t) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p ((s :.: t) a) ((s :.: t) b) Source #

Homogeneous t => Homogeneous (M1 i c t) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

homogeneously :: Distributor p => p a b -> p (M1 i c t a) (M1 i c t b) Source #

SepBy

data SepBy p Source #

Used to sequence multiple times, separated by a separateBy, begun by a beginBy, and ended by an endBy.

Constructors

SepBy 

Fields

Instances

Instances details
Foldable SepBy Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

fold :: Monoid m => SepBy m -> m #

foldMap :: Monoid m => (a -> m) -> SepBy a -> m #

foldMap' :: Monoid m => (a -> m) -> SepBy a -> m #

foldr :: (a -> b -> b) -> b -> SepBy a -> b #

foldr' :: (a -> b -> b) -> b -> SepBy a -> b #

foldl :: (b -> a -> b) -> b -> SepBy a -> b #

foldl' :: (b -> a -> b) -> b -> SepBy a -> b #

foldr1 :: (a -> a -> a) -> SepBy a -> a #

foldl1 :: (a -> a -> a) -> SepBy a -> a #

toList :: SepBy a -> [a] #

null :: SepBy a -> Bool #

length :: SepBy a -> Int #

elem :: Eq a => a -> SepBy a -> Bool #

maximum :: Ord a => SepBy a -> a #

minimum :: Ord a => SepBy a -> a #

sum :: Num a => SepBy a -> a #

product :: Num a => SepBy a -> a #

Traversable SepBy Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

traverse :: Applicative f => (a -> f b) -> SepBy a -> f (SepBy b) #

sequenceA :: Applicative f => SepBy (f a) -> f (SepBy a) #

mapM :: Monad m => (a -> m b) -> SepBy a -> m (SepBy b) #

sequence :: Monad m => SepBy (m a) -> m (SepBy a) #

Functor SepBy Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

fmap :: (a -> b) -> SepBy a -> SepBy b #

(<$) :: a -> SepBy b -> SepBy a #

Read p => Read (SepBy p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Show p => Show (SepBy p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

showsPrec :: Int -> SepBy p -> ShowS #

show :: SepBy p -> String #

showList :: [SepBy p] -> ShowS #

Eq p => Eq (SepBy p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

(==) :: SepBy p -> SepBy p -> Bool #

(/=) :: SepBy p -> SepBy p -> Bool #

Ord p => Ord (SepBy p) Source # 
Instance details

Defined in Data.Profunctor.Distributor

Methods

compare :: SepBy p -> SepBy p -> Ordering #

(<) :: SepBy p -> SepBy p -> Bool #

(<=) :: SepBy p -> SepBy p -> Bool #

(>) :: SepBy p -> SepBy p -> Bool #

(>=) :: SepBy p -> SepBy p -> Bool #

max :: SepBy p -> SepBy p -> SepBy p #

min :: SepBy p -> SepBy p -> SepBy p #

sepBy :: Monoidal p => p () () -> SepBy (p () ()) Source #

A SepBy smart constructor, setting the separateBy field, with no beginning or ending delimitors, except by updating beginBy or endBy fields.

noSep :: Monoidal p => SepBy (p () ()) Source #

A SepBy smart constructor for no separator, beginning or ending delimiters.

several :: (IsList s, IsList t, Distributor p) => SepBy (p () ()) -> p (Item s) (Item t) -> p s t Source #

several noSep = manyP

several1 :: (IsList s, IsList t, Distributor p, Choice p) => SepBy (p () ()) -> p (Item s) (Item t) -> p s t Source #

several1 noSep p = someP p

chain Source #

Arguments

:: Alternator p 
=> (forall x. x -> Either x x)

Left or Right associate

-> APartialIso a b (a, a) (b, b)

binary constructor pattern

-> APrism a b () ()

nilary constructor pattern

-> SepBy (p () ()) 
-> p a b 
-> p a b 

Use a nilary constructor pattern to sequence zero times, or associate a binary constructor pattern to sequence one or more times.

chain1 Source #

Arguments

:: (Distributor p, Choice p) 
=> (forall x. x -> Either x x)

Left or Right associate

-> APartialIso a b (a, a) (b, b)

binary constructor pattern

-> SepBy (p () ()) 
-> p a b 
-> p a b 

Associate a binary constructor pattern to sequence one or more times.

intercalateP :: (Monoidal p, Choice p, AsEmpty s, AsEmpty t, Cons s t a b) => Int -> SepBy (p () ()) -> p a b -> p s t Source #