squares-0.1.1: The double category of Hask functors and profunctors

LicenseBSD-style (see the file LICENSE)
Maintainersjoerd@w3future.com
Safe HaskellSafe
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
(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 #

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

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

Profunctor p => Profunctor (PList (p ': ([] :: [Type -> Type -> Type]))) 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 #

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

(.#) :: 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 #

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

(.#) :: 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
type PlainP ([] :: [Type -> Type -> Type]) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

type PlainP ([] :: [Type -> Type -> Type]) = ((->) :: 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 ': ([] :: [Type -> Type -> Type])) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

type PlainP (p ': ([] :: [Type -> Type -> Type])) = 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
IsPList ([] :: [Type -> Type -> Type]) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

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

Defined in Data.Profunctor.Composition.List

Methods

pappend :: (Profunctor (PList (p ': (q ': qs))), Profunctor (PList qs0)) => Procompose (PList qs0) (PList (p ': (q ': qs))) :-> PList ((p ': (q ': qs)) ++ qs0) Source #

punappend :: 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 ': ([] :: [Type -> Type -> Type])) Source # 
Instance details

Defined in Data.Profunctor.Composition.List

Methods

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

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

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

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