squares-0.2.1: The double category of Hask functors and profunctors
LicenseBSD-style (see the file LICENSE)
Maintainersjoerd@w3future.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Profunctor.Composition.List

Description

 
Synopsis

Documentation

data PList (ps :: [* -> * -> *]) (a :: *) (b :: *) where Source #

N-ary composition of profunctors.

Constructors

Hom 

Fields

P 

Fields

  • :: { unP :: p a b
     
  •    } -> PList '[p] a b
     
PComp :: p a x -> PList (q ': qs) x b -> PList (p ': (q ': qs)) a b 

Instances

Instances details
(Profunctor p, Profunctor (PList (q ': qs))) => Profunctor (PList (p ': (q ': qs))) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

Methods

dimap :: (a -> b) -> (c -> d) -> PList (p ': (q ': qs)) b c -> PList (p ': (q ': qs)) a d #

lmap :: (a -> b) -> PList (p ': (q ': qs)) b c -> PList (p ': (q ': qs)) a c #

rmap :: (b -> c) -> PList (p ': (q ': qs)) a b -> PList (p ': (q ': qs)) a c #

(#.) :: forall a b c q0. Coercible c b => q0 b c -> PList (p ': (q ': qs)) a b -> PList (p ': (q ': qs)) a c #

(.#) :: forall a b c q0. Coercible b a => PList (p ': (q ': qs)) b c -> q0 a b -> PList (p ': (q ': qs)) a c #

Profunctor p => Profunctor (PList '[p]) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

Methods

dimap :: (a -> b) -> (c -> d) -> PList '[p] b c -> PList '[p] a d #

lmap :: (a -> b) -> PList '[p] b c -> PList '[p] a c #

rmap :: (b -> c) -> PList '[p] a b -> PList '[p] a c #

(#.) :: forall a b c q. Coercible c b => q b c -> PList '[p] a b -> PList '[p] a c #

(.#) :: forall a b c q. Coercible b a => PList '[p] b c -> q a b -> PList '[p] a c #

Profunctor (PList ('[] :: [Type -> Type -> Type])) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

Methods

dimap :: (a -> b) -> (c -> d) -> PList '[] b c -> PList '[] a d #

lmap :: (a -> b) -> PList '[] b c -> PList '[] a c #

rmap :: (b -> c) -> PList '[] a b -> PList '[] a c #

(#.) :: forall a b c q. Coercible c b => q b c -> PList '[] a b -> PList '[] a c #

(.#) :: forall a b c q. Coercible b a => PList '[] b c -> q a b -> PList '[] a c #

type family PlainP (ps :: [* -> * -> *]) :: * -> * -> * Source #

Calculate the simplified type of the composition of a list of profunctors.

Instances

Instances details
type PlainP ('[] :: [Type -> Type -> Type]) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

type PlainP ('[] :: [Type -> Type -> Type]) = (->)
type PlainP (p ': (q ': qs)) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

type PlainP (p ': (q ': qs)) = Procompose (PlainP (q ': qs)) p
type PlainP '[p] Source # 
Instance details

Defined in Data.Profunctor.Composition.List

type PlainP '[p] = p

class IsPList ps where Source #

Functions for working with PLists.

Methods

pappend :: (Profunctor (PList ps), Profunctor (PList qs)) => Procompose (PList qs) (PList ps) :-> PList (ps ++ qs) Source #

Combine 2 nested PLists into one PList.

punappend :: PList (ps ++ qs) :-> Procompose (PList qs) (PList ps) Source #

Split one PList into 2 nested PLists.

toPlainP :: PList ps :-> PlainP ps Source #

Convert a PList to its simplified form.

fromPlainP :: PlainP ps :-> PList ps Source #

Create a PList from its simplified form.

Instances

Instances details
IsPList ('[] :: [Type -> Type -> Type]) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

Methods

pappend :: forall (qs :: [Type -> Type -> Type]). (Profunctor (PList '[]), Profunctor (PList qs)) => Procompose (PList qs) (PList '[]) :-> PList ('[] ++ qs) Source #

punappend :: forall (qs :: [Type -> Type -> Type]). PList ('[] ++ qs) :-> Procompose (PList qs) (PList '[]) Source #

toPlainP :: PList '[] :-> PlainP '[] Source #

fromPlainP :: PlainP '[] :-> PList '[] Source #

(Profunctor (PList (q ': qs)), IsPList (q ': qs)) => IsPList (p ': (q ': qs)) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

Methods

pappend :: forall (qs0 :: [Type -> Type -> Type]). (Profunctor (PList (p ': (q ': qs))), Profunctor (PList qs0)) => Procompose (PList qs0) (PList (p ': (q ': qs))) :-> PList ((p ': (q ': qs)) ++ qs0) Source #

punappend :: forall (qs0 :: [Type -> Type -> Type]). PList ((p ': (q ': qs)) ++ qs0) :-> Procompose (PList qs0) (PList (p ': (q ': qs))) Source #

toPlainP :: PList (p ': (q ': qs)) :-> PlainP (p ': (q ': qs)) Source #

fromPlainP :: PlainP (p ': (q ': qs)) :-> PList (p ': (q ': qs)) Source #

IsPList '[p] Source # 
Instance details

Defined in Data.Profunctor.Composition.List

Methods

pappend :: forall (qs :: [Type -> Type -> Type]). (Profunctor (PList '[p]), Profunctor (PList qs)) => Procompose (PList qs) (PList '[p]) :-> PList ('[p] ++ qs) Source #

punappend :: forall (qs :: [Type -> Type -> Type]). PList ('[p] ++ qs) :-> Procompose (PList qs) (PList '[p]) Source #

toPlainP :: PList '[p] :-> PlainP '[p] Source #

fromPlainP :: PlainP '[p] :-> PList '[p] Source #