proarrow
Safe HaskellNone
LanguageHaskell2010

Proarrow.Category.Instance.Free

Documentation

newtype FREE (cs :: [Kind -> Constraint]) (p :: CAT j) k Source Comments #

Constructors

EMB j 

Instances

Instances details
HasInitialObject k => IsFreeOb (InitF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (InitF :: FREE c p k)) => r) -> r Source Comments #

HasTerminalObject k => IsFreeOb (TermF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (TermF :: FREE c p k)) => r) -> r Source Comments #

Monoidal k => IsFreeOb (UnitF :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (UnitF :: FREE cs p k)) => r) -> r Source Comments #

(HasBinaryProducts k, Ob a, Ob b) => IsFreeOb (a *! b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a *! b)) => r) -> r Source Comments #

(HasBinaryCoproducts k, Ob a, Ob b) => IsFreeOb (a + b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a + b)) => r) -> r Source Comments #

(Monoidal k, Ob a, Ob b) => IsFreeOb (a **! b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a **! b)) => r) -> r Source Comments #

(Closed k, Ob a, Ob b) => IsFreeOb (a --> b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a --> b)) => r) -> r Source Comments #

(Monoidal k, Ok cs p k, Includes cs Monoidal) => Monoidal (FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

type Unit 
Instance details

Defined in Proarrow.Category.Instance.Free

type Unit = UnitF :: FREE cs p k

Methods

withOb2 :: forall (a :: FREE cs p k) (b :: FREE cs p k) r. (Ob a, Ob b) => (Ob (a ** b) => r) -> r Source Comments #

leftUnitor :: forall (a :: FREE cs p k). Ob a => ((Unit :: FREE cs p k) ** a) ~> a Source Comments #

leftUnitorInv :: forall (a :: FREE cs p k). Ob a => a ~> ((Unit :: FREE cs p k) ** a) Source Comments #

rightUnitor :: forall (a :: FREE cs p k). Ob a => (a ** (Unit :: FREE cs p k)) ~> a Source Comments #

rightUnitorInv :: forall (a :: FREE cs p k). Ob a => a ~> (a ** (Unit :: FREE cs p k)) Source Comments #

associator :: forall (a :: FREE cs p k) (b :: FREE cs p k) (c :: FREE cs p k). (Ob a, Ob b, Ob c) => ((a ** b) ** c) ~> (a ** (b ** c)) Source Comments #

associatorInv :: forall (a :: FREE cs p k) (b :: FREE cs p k) (c :: FREE cs p k). (Ob a, Ob b, Ob c) => (a ** (b ** c)) ~> ((a ** b) ** c) Source Comments #

Ok c p k => CategoryOf (FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Free

type (~>) = Free :: FREE c p k -> FREE c p k -> Type
(HasBinaryCoproducts k, Ok cs p k, Includes cs HasBinaryCoproducts) => HasBinaryCoproducts (FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withObCoprod :: forall (a :: FREE cs p k) (b :: FREE cs p k) r. (Ob a, Ob b) => (Ob (a || b) => r) -> r Source Comments #

lft :: forall (a :: FREE cs p k) (b :: FREE cs p k). (Ob a, Ob b) => a ~> (a || b) Source Comments #

rgt :: forall (a :: FREE cs p k) (b :: FREE cs p k). (Ob a, Ob b) => b ~> (a || b) Source Comments #

(|||) :: forall (x :: FREE cs p k) (a :: FREE cs p k) (y :: FREE cs p k). (x ~> a) -> (y ~> a) -> (x || y) ~> a Source Comments #

(+++) :: forall (a :: FREE cs p k) (b :: FREE cs p k) (x :: FREE cs p k) (y :: FREE cs p k). (a ~> x) -> (b ~> y) -> (a || b) ~> (x || y) Source Comments #

(HasBinaryProducts k, Ok cs p k, Includes cs HasBinaryProducts) => HasBinaryProducts (FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withObProd :: forall (a :: FREE cs p k) (b :: FREE cs p k) r. (Ob a, Ob b) => (Ob (a && b) => r) -> r Source Comments #

fst :: forall (a :: FREE cs p k) (b :: FREE cs p k). (Ob a, Ob b) => (a && b) ~> a Source Comments #

snd :: forall (a :: FREE cs p k) (b :: FREE cs p k). (Ob a, Ob b) => (a && b) ~> b Source Comments #

(&&&) :: forall (a :: FREE cs p k) (x :: FREE cs p k) (y :: FREE cs p k). (a ~> x) -> (a ~> y) -> a ~> (x && y) Source Comments #

(***) :: forall (a :: FREE cs p k) (b :: FREE cs p k) (x :: FREE cs p k) (y :: FREE cs p k). (a ~> x) -> (b ~> y) -> (a && b) ~> (x && y) Source Comments #

(Closed k, Ok cs p k, Includes cs Closed, Includes cs Monoidal) => Closed (FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withObExp :: forall (a :: FREE cs p k) (b :: FREE cs p k) r. (Ob a, Ob b) => (Ob (a ~~> b) => r) -> r Source Comments #

curry :: forall (a :: FREE cs p k) (b :: FREE cs p k) (c :: FREE cs p k). (Ob a, Ob b) => ((a ** b) ~> c) -> a ~> (b ~~> c) Source Comments #

apply :: forall (a :: FREE cs p k) (b :: FREE cs p k). (Ob a, Ob b) => ((a ~~> b) ** a) ~> b Source Comments #

(^^^) :: forall (a :: FREE cs p k) (b :: FREE cs p k) (x :: FREE cs p k) (y :: FREE cs p k). (b ~> y) -> (x ~> a) -> (a ~~> b) ~> (x ~~> y) Source Comments #

(HasInitialObject k, Ok cs p k, Includes cs HasInitialObject) => HasInitialObject (FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

type InitialObject 
Instance details

Defined in Proarrow.Category.Instance.Free

type InitialObject = InitF :: FREE cs p k

Methods

initiate :: forall (a :: FREE cs p k). Ob a => (InitialObject :: FREE cs p k) ~> a Source Comments #

(HasTerminalObject k, Ok cs p k, Includes cs HasTerminalObject) => HasTerminalObject (FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

type TerminalObject 
Instance details

Defined in Proarrow.Category.Instance.Free

type TerminalObject = TermF :: FREE cs p k

Methods

terminate :: forall (a :: FREE cs p k). Ob a => a ~> (TerminalObject :: FREE cs p k) Source Comments #

Ok c p k => Promonad (Free :: FREE c p k -> FREE c p k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

id :: forall (a :: FREE c p k). Ob a => Free a a Source Comments #

(.) :: forall (b :: FREE c p k) (c0 :: FREE c p k) (a :: FREE c p k). Free b c0 -> Free a b -> Free a c0 Source Comments #

(Monoidal k, Ok cs p k, Includes cs Monoidal) => MonoidalProfunctor (Free :: FREE cs p k -> FREE cs p k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

par0 :: Free (Unit :: FREE cs p k) (Unit :: FREE cs p k) Source Comments #

par :: forall (x1 :: FREE cs p k) (x2 :: FREE cs p k) (y1 :: FREE cs p k) (y2 :: FREE cs p k). Free x1 x2 -> Free y1 y2 -> Free (x1 ** y1) (x2 ** y2) Source Comments #

Ok c p k => Profunctor (Free :: FREE c p k -> FREE c p k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

dimap :: forall (c0 :: FREE c p k) (a :: FREE c p k) (b :: FREE c p k) (d :: FREE c p k). (c0 ~> a) -> (b ~> d) -> Free a b -> Free c0 d Source Comments #

(\\) :: forall (a :: FREE c p k) (b :: FREE c p k) r. ((Ob a, Ob b) => r) -> Free a b -> r Source Comments #

type Lower (f :: j +-> k) (InitF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (InitF :: FREE c p k) = InitialObject :: k
type Lower (f :: j +-> k) (TermF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (TermF :: FREE c p k) = TerminalObject :: k
type Lower (f :: j +-> k) (UnitF :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (UnitF :: FREE cs p k) = Unit :: k
type Lower (f :: j +-> k) (a *! b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (a *! b :: FREE c p k) = Lower f a && Lower f b
type Lower (f :: j +-> k) (a + b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (a + b :: FREE c p k) = Lower f a || Lower f b
type Lower (f :: j +-> k) (a **! b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (a **! b :: FREE cs p k) = Lower f a ** Lower f b
type Lower (f :: j +-> k) (a --> b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (a --> b :: FREE cs p k) = Lower f a ~~> Lower f b
type UN ('EMB :: j -> FREE cs p k) ('EMB a :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type UN ('EMB :: j -> FREE cs p k) ('EMB a :: FREE cs p k) = a
type Unit Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Unit = UnitF :: FREE cs p k
type (~>) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type (~>) = Free :: FREE c p k -> FREE c p k -> Type
type InitialObject Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type InitialObject = InitF :: FREE cs p k
type TerminalObject Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type TerminalObject = TermF :: FREE cs p k
type Ob (a :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Ob (a :: FREE c p k) = (IsFreeOb a, Typeable a)
type (a :: FREE cs p k) ** (b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type (a :: FREE cs p k) ** (b :: FREE cs p k) = a **! b
type (a :: FREE cs p k) || (b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type (a :: FREE cs p k) || (b :: FREE cs p k) = a + b
type (a :: FREE cs p k) && (b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type (a :: FREE cs p k) && (b :: FREE cs p k) = a *! b
type (a :: FREE cs p k) ~~> (b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type (a :: FREE cs p k) ~~> (b :: FREE cs p k) = a --> b

type family All (cs :: [Kind -> Constraint]) k where ... Source Comments #

Equations

All ('[] :: [Kind -> Constraint]) k = () 
All (c ': cs) k = (c k, All cs k) 

class Includes (cs :: k) (c :: Kind -> Constraint) Source Comments #

Instances

Instances details
Includes (c ': cs :: [Kind -> Constraint]) c Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Includes cs c => Includes (d ': cs :: [a]) c Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

data Free (a :: FREE cs p k) (b :: FREE cs p k) where Source Comments #

Constructors

Id :: forall {j} {cs :: [Kind -> Constraint]} {p :: CAT j} {k} (a :: FREE cs p k). Ob a => Free a a 
Emb :: forall {j} (a1 :: j) (b1 :: j) (p :: CAT j) (cs :: [Kind -> Constraint]) k (a :: FREE cs p k). (Ob a1, Ob b1, Typeable a1, Typeable b1) => p a1 b1 -> Free a ('EMB a1 :: FREE cs p k) -> Free a ('EMB b1 :: FREE cs p k) 
Str :: forall {j} {k} {cs :: [Kind -> Constraint]} {p :: CAT j} (c :: Kind -> Constraint) (a1 :: FREE cs p k) (b :: FREE cs p k) (a :: FREE cs p k). (All cs k => c k, Includes cs c, HasStructure k cs p c, Ob a1, Ob b) => Struct c a1 b -> Free a a1 -> Free a b 

Instances

Instances details
Ok c p k => Promonad (Free :: FREE c p k -> FREE c p k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

id :: forall (a :: FREE c p k). Ob a => Free a a Source Comments #

(.) :: forall (b :: FREE c p k) (c0 :: FREE c p k) (a :: FREE c p k). Free b c0 -> Free a b -> Free a c0 Source Comments #

(Monoidal k, Ok cs p k, Includes cs Monoidal) => MonoidalProfunctor (Free :: FREE cs p k -> FREE cs p k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

par0 :: Free (Unit :: FREE cs p k) (Unit :: FREE cs p k) Source Comments #

par :: forall (x1 :: FREE cs p k) (x2 :: FREE cs p k) (y1 :: FREE cs p k) (y2 :: FREE cs p k). Free x1 x2 -> Free y1 y2 -> Free (x1 ** y1) (x2 ** y2) Source Comments #

Ok c p k => Profunctor (Free :: FREE c p k -> FREE c p k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

dimap :: forall (c0 :: FREE c p k) (a :: FREE c p k) (b :: FREE c p k) (d :: FREE c p k). (c0 ~> a) -> (b ~> d) -> Free a b -> Free c0 d Source Comments #

(\\) :: forall (a :: FREE c p k) (b :: FREE c p k) r. ((Ob a, Ob b) => r) -> Free a b -> r Source Comments #

WithEq a => Eq (Free a b) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

(==) :: Free a b -> Free a b -> Bool Comments #

(/=) :: Free a b -> Free a b -> Bool Comments #

emb :: forall {j} (a :: j) (b :: j) (cs :: [Kind -> Constraint]) p k. (Ob a, Ob b, Typeable a, Typeable b, Ok cs p k) => p a b %1 -> Free ('EMB a :: FREE cs p k) ('EMB b :: FREE cs p k) Source Comments #

class (forall (x :: k) (y :: k1). Eq (p x y)) => Eq2 (p :: k -> k1 -> Type) Source Comments #

Instances

Instances details
(forall (x :: k1) (y :: k2). Eq (p x y)) => Eq2 (p :: k1 -> k2 -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

class (forall (x :: k) (y :: k1). Show (p x y)) => Show2 (p :: k -> k1 -> Type) Source Comments #

Instances

Instances details
(forall (x :: k1) (y :: k2). Show (p x y)) => Show2 (p :: k1 -> k2 -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

class (Typeable p, Typeable c, Typeable k2, Typeable j) => Ok (c :: k) (p :: CAT j) (k2 :: k1) Source Comments #

Instances

Instances details
(Typeable p, Typeable c, Typeable k3, Typeable j) => Ok (c :: k1) (p :: CAT j) (k3 :: k2) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

class (Ok c p k, Eq2 p) => WithEq (a :: FREE c p k) Source Comments #

Instances

Instances details
(Ok c p k, Eq2 p) => WithEq (a :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

class IsFreeOb (a :: FREE cs p k) where Source Comments #

Associated Types

type Lower (f :: j +-> k) (a :: FREE cs p k) :: k Source Comments #

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f a) => r) -> r Source Comments #

Instances

Instances details
HasInitialObject k => IsFreeOb (InitF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (InitF :: FREE c p k)) => r) -> r Source Comments #

HasTerminalObject k => IsFreeOb (TermF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (TermF :: FREE c p k)) => r) -> r Source Comments #

Monoidal k => IsFreeOb (UnitF :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (UnitF :: FREE cs p k)) => r) -> r Source Comments #

(HasBinaryProducts k, Ob a, Ob b) => IsFreeOb (a *! b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a *! b)) => r) -> r Source Comments #

(HasBinaryCoproducts k, Ob a, Ob b) => IsFreeOb (a + b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a + b)) => r) -> r Source Comments #

(Monoidal k, Ob a, Ob b) => IsFreeOb (a **! b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a **! b)) => r) -> r Source Comments #

(Closed k, Ob a, Ob b) => IsFreeOb (a --> b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a --> b)) => r) -> r Source Comments #

(Ob a, Typeable a) => IsFreeOb ('EMB a :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f ('EMB a :: FREE cs p k)) => r) -> r Source Comments #

class ((Ok c p k, Eq2 p) => Eq2 str, Ok c p k => Typeable str) => CanEq (str :: CAT (FREE c p k)) Source Comments #

Instances

Instances details
((Ok c p k, Eq2 p) => Eq2 str, Ok c p k => Typeable str) => CanEq (str :: FREE c p k -> FREE c p k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

class (Typeable c, CanEq (Struct c :: CAT (FREE cs p k))) => HasStructure k (cs :: [Kind -> Constraint]) (p :: CAT j) (c :: Kind -> Constraint) where Source Comments #

Associated Types

data Struct (c :: Kind -> Constraint) :: CAT (FREE cs p k) Source Comments #

Methods

foldStructure :: forall (f :: j +-> k) (a :: FREE cs p k) (b :: FREE cs p k). (c k, Representable f) => (forall (x :: FREE cs p k) (y :: FREE cs p k). (x ~> y) -> Lower f x ~> Lower f y) -> Struct c a b -> Lower f a ~> Lower f b Source Comments #

Instances

Instances details
HasStructure k cs (p :: CAT j) Monoidal Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

data Struct Monoidal (i :: FREE cs p k) (o :: FREE cs p k) 
Instance details

Defined in Proarrow.Category.Instance.Free

data Struct Monoidal (i :: FREE cs p k) (o :: FREE cs p k) where

Methods

foldStructure :: forall (f :: j +-> k) (a :: FREE cs p k) (b :: FREE cs p k). (Monoidal k, Representable f) => (forall (x :: FREE cs p k) (y :: FREE cs p k). (x ~> y) -> Lower f x ~> Lower f y) -> Struct Monoidal a b -> Lower f a ~> Lower f b Source Comments #

HasStructure k cs (p :: CAT j) HasBinaryCoproducts Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

data Struct HasBinaryCoproducts (i :: FREE cs p k) (o :: FREE cs p k) 
Instance details

Defined in Proarrow.Category.Instance.Free

data Struct HasBinaryCoproducts (i :: FREE cs p k) (o :: FREE cs p k) where

Methods

foldStructure :: forall (f :: j +-> k) (a :: FREE cs p k) (b :: FREE cs p k). (HasBinaryCoproducts k, Representable f) => (forall (x :: FREE cs p k) (y :: FREE cs p k). (x ~> y) -> Lower f x ~> Lower f y) -> Struct HasBinaryCoproducts a b -> Lower f a ~> Lower f b Source Comments #

HasStructure k cs (p :: CAT j) HasBinaryProducts Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

data Struct HasBinaryProducts (i :: FREE cs p k) (o :: FREE cs p k) 
Instance details

Defined in Proarrow.Category.Instance.Free

data Struct HasBinaryProducts (i :: FREE cs p k) (o :: FREE cs p k) where

Methods

foldStructure :: forall (f :: j +-> k) (a :: FREE cs p k) (b :: FREE cs p k). (HasBinaryProducts k, Representable f) => (forall (x :: FREE cs p k) (y :: FREE cs p k). (x ~> y) -> Lower f x ~> Lower f y) -> Struct HasBinaryProducts a b -> Lower f a ~> Lower f b Source Comments #

HasStructure k cs (p :: CAT j) Closed Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

data Struct Closed (a :: FREE cs p k) (b :: FREE cs p k) 
Instance details

Defined in Proarrow.Category.Instance.Free

data Struct Closed (a :: FREE cs p k) (b :: FREE cs p k) where

Methods

foldStructure :: forall (f :: j +-> k) (a :: FREE cs p k) (b :: FREE cs p k). (Closed k, Representable f) => (forall (x :: FREE cs p k) (y :: FREE cs p k). (x ~> y) -> Lower f x ~> Lower f y) -> Struct Closed a b -> Lower f a ~> Lower f b Source Comments #

HasStructure k cs (p :: CAT j) HasInitialObject Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

data Struct HasInitialObject (a :: FREE cs p k) (b :: FREE cs p k) 
Instance details

Defined in Proarrow.Category.Instance.Free

data Struct HasInitialObject (a :: FREE cs p k) (b :: FREE cs p k) where

Methods

foldStructure :: forall (f :: j +-> k) (a :: FREE cs p k) (b :: FREE cs p k). (HasInitialObject k, Representable f) => (forall (x :: FREE cs p k) (y :: FREE cs p k). (x ~> y) -> Lower f x ~> Lower f y) -> Struct HasInitialObject a b -> Lower f a ~> Lower f b Source Comments #

HasStructure k cs (p :: CAT j) HasTerminalObject Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

data Struct HasTerminalObject (a :: FREE cs p k) (b :: FREE cs p k) 
Instance details

Defined in Proarrow.Category.Instance.Free

data Struct HasTerminalObject (a :: FREE cs p k) (b :: FREE cs p k) where

Methods

foldStructure :: forall (f :: j +-> k) (a :: FREE cs p k) (b :: FREE cs p k). (HasTerminalObject k, Representable f) => (forall (x :: FREE cs p k) (y :: FREE cs p k). (x ~> y) -> Lower f x ~> Lower f y) -> Struct HasTerminalObject a b -> Lower f a ~> Lower f b Source Comments #

fold :: forall {j} {k} {p} (cs :: [Kind -> Constraint]) f (a :: FREE cs p k) (b :: FREE cs p k). (All cs k, Representable f) => (forall (x :: j) (y :: j). p x y -> f (f % x) y) -> (a ~> b) -> Lower f a ~> Lower f b Source Comments #

retract :: forall {j} {k} (cs :: [Kind -> Constraint]) (f :: j +-> k) (a :: FREE cs (InitialProfunctor :: j -> j -> Type) k) (b :: FREE cs (InitialProfunctor :: j -> j -> Type) k). (All cs k, Representable f) => (a ~> b) -> Lower f a ~> Lower f b Source Comments #

type Req (c :: Type -> Constraint) (lut :: [(Symbol, k)]) (a :: FREE cs p k) (b :: FREE cs p k) = () Source Comments #

data AssertEqs (c :: Kind -> Constraint) k where Source Comments #

Constructors

NoLaws :: forall (c :: Kind -> Constraint) k. AssertEqs c k 
(:>>:) :: forall (c :: Kind -> Constraint) k. AssertEqs c k -> AssertEqs c k -> AssertEqs c k 
(:=:) :: forall {k} {c :: Kind -> Constraint} (a :: FREE '[c] (Var c) k) (b :: FREE '[c] (Var c) k). (forall r (lut :: [(Symbol, k)]). ((Req Eq lut a b, Req Show lut a b) => Free a b -> Free a b -> r) -> r) -> AssertEqs c k infix 0 

(>>) :: forall (c :: Kind -> Constraint) k. AssertEqs c k -> AssertEqs c k -> AssertEqs c k Source Comments #

class Laws (c :: Kind -> Constraint) where Source Comments #

Associated Types

data Var (c :: Kind -> Constraint) (a :: Symbol) (b :: Symbol) Source Comments #

Methods

laws :: (c k, Typeable k) => AssertEqs c k Source Comments #

Instances

Instances details
Laws HasBinaryProducts Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

data Var HasBinaryProducts a b 
Instance details

Defined in Proarrow.Category.Instance.Free

data Var HasBinaryProducts a b where

type family AssocLookup (lut :: [(Symbol, k)]) (a :: Symbol) :: k where ... Source Comments #

Equations

AssocLookup ('[] :: [(Symbol, k)]) a = Any :: k 
AssocLookup ('(s, k2) ': lut :: [(Symbol, k1)]) s = k2 
AssocLookup ('(s, k2) ': lut :: [(Symbol, k1)]) a = AssocLookup lut a 

type family AllOb (lut :: [(Symbol, k)]) where ... Source Comments #

Equations

AllOb ('[] :: [(Symbol, k)]) = () 
AllOb ('(s, k2) ': lut :: [(Symbol, k1)]) = (Ob k2, AllOb lut) 

data Lookup (lut :: [(Symbol, k)]) (a :: k) (b :: Symbol) where Source Comments #

Constructors

Lookup :: forall {k} (lut :: [(Symbol, k)]) (b :: Symbol) (a :: k). Ob b => (a ~> (Lookup lut % b)) -> Lookup lut a b 

Instances

Instances details
(CategoryOf k, AllOb lut) => Profunctor (Lookup lut :: k -> Symbol -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

dimap :: forall (c :: k) (a :: k) (b :: Symbol) (d :: Symbol). (c ~> a) -> (b ~> d) -> Lookup lut a b -> Lookup lut c d Source Comments #

(\\) :: forall (a :: k) (b :: Symbol) r. ((Ob a, Ob b) => r) -> Lookup lut a b -> r Source Comments #

(CategoryOf k, AllOb lut) => Representable (Lookup lut :: k -> Symbol -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

index :: forall (a :: k) (b :: Symbol). Lookup lut a b -> a ~> (Lookup lut % b) Source Comments #

tabulate :: forall (b :: Symbol) (a :: k). Ob b => (a ~> (Lookup lut % b)) -> Lookup lut a b Source Comments #

repMap :: forall (a :: Symbol) (b :: Symbol). (a ~> b) -> (Lookup lut % a) ~> (Lookup lut % b) Source Comments #

type (Lookup lut :: k -> Symbol -> Type) % (a :: Symbol) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type (Lookup lut :: k -> Symbol -> Type) % (a :: Symbol) = AssocLookup lut a

data family TermF :: k Source Comments #

Instances

Instances details
HasTerminalObject k => IsFreeOb (TermF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (TermF :: FREE c p k)) => r) -> r Source Comments #

type Lower (f :: j +-> k) (TermF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (TermF :: FREE c p k) = TerminalObject :: k

data family InitF :: k Source Comments #

Instances

Instances details
HasInitialObject k => IsFreeOb (InitF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (InitF :: FREE c p k)) => r) -> r Source Comments #

type Lower (f :: j +-> k) (InitF :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (InitF :: FREE c p k) = InitialObject :: k

data family (a :: k) *! (b :: k) :: k Source Comments #

Instances

Instances details
(HasBinaryProducts k, Ob a, Ob b) => IsFreeOb (a *! b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a *! b)) => r) -> r Source Comments #

type Lower (f :: j +-> k) (a *! b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (a *! b :: FREE c p k) = Lower f a && Lower f b

data family (a :: k) + (b :: k) :: k Source Comments #

Instances

Instances details
(HasBinaryCoproducts k, Ob a, Ob b) => IsFreeOb (a + b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a + b)) => r) -> r Source Comments #

type Lower (f :: j +-> k) (a + b :: FREE c p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (a + b :: FREE c p k) = Lower f a || Lower f b

data family UnitF :: k Source Comments #

Instances

Instances details
Monoidal k => IsFreeOb (UnitF :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (UnitF :: FREE cs p k)) => r) -> r Source Comments #

type Lower (f :: j +-> k) (UnitF :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (UnitF :: FREE cs p k) = Unit :: k

data family (a :: k) **! (b :: k) :: k Source Comments #

Instances

Instances details
(Monoidal k, Ob a, Ob b) => IsFreeOb (a **! b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a **! b)) => r) -> r Source Comments #

type Lower (f :: j +-> k) (a **! b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (a **! b :: FREE cs p k) = Lower f a ** Lower f b

data family (a :: k) --> (b :: k) :: k Source Comments #

Instances

Instances details
(Closed k, Ob a, Ob b) => IsFreeOb (a --> b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

withLowerOb :: forall (f :: j +-> k) r. Representable f => (Ob (Lower f (a --> b)) => r) -> r Source Comments #

type Lower (f :: j +-> k) (a --> b :: FREE cs p k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Lower (f :: j +-> k) (a --> b :: FREE cs p k) = Lower f a ~~> Lower f b

data TestTy Source Comments #

Constructors

IntTy' 
StringTy' 

Instances

Instances details
Profunctor Interp Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

dimap :: forall c a (b :: DISCRETE TestTy) (d :: DISCRETE TestTy). (c ~> a) -> (b ~> d) -> Interp a b -> Interp c d Source Comments #

(\\) :: forall a (b :: DISCRETE TestTy) r. ((Ob a, Ob b) => r) -> Interp a b -> r Source Comments #

Representable Interp Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

type Interp % IntTy 
Instance details

Defined in Proarrow.Category.Instance.Free

type Interp % IntTy = Int
type Interp % StringTy 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

index :: forall a (b :: DISCRETE TestTy). Interp a b -> a ~> (Interp % b) Source Comments #

tabulate :: forall (b :: DISCRETE TestTy) a. Ob b => (a ~> (Interp % b)) -> Interp a b Source Comments #

repMap :: forall (a :: DISCRETE TestTy) (b :: DISCRETE TestTy). (a ~> b) -> (Interp % a) ~> (Interp % b) Source Comments #

type Interp % IntTy Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Interp % IntTy = Int
type Interp % StringTy Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

data Test (a :: DISCRETE TestTy) (b :: DISCRETE TestTy) where Source Comments #

Constructors

Show :: Test ('D 'IntTy') ('D 'StringTy') 
Read :: Test ('D 'StringTy') ('D 'IntTy') 
Succ :: Test ('D 'IntTy') ('D 'IntTy') 
Dup :: Test ('D 'StringTy') ('D 'StringTy') 

show :: forall (cs :: [Kind -> Constraint]) k (i :: FREE cs Test k). (i ~> ('EMB IntTy :: FREE cs Test k)) %1 -> i ~> ('EMB StringTy :: FREE cs Test k) Source Comments #

read :: forall (cs :: [Kind -> Constraint]) k (i :: FREE cs Test k). (i ~> ('EMB StringTy :: FREE cs Test k)) %1 -> i ~> ('EMB IntTy :: FREE cs Test k) Source Comments #

succ :: forall (cs :: [Kind -> Constraint]) k (i :: FREE cs Test k). (i ~> ('EMB IntTy :: FREE cs Test k)) %1 -> i ~> ('EMB IntTy :: FREE cs Test k) Source Comments #

dup :: forall (cs :: [Kind -> Constraint]) k (i :: FREE cs Test k). (i ~> ('EMB StringTy :: FREE cs Test k)) %1 -> i ~> ('EMB StringTy :: FREE cs Test k) Source Comments #

test :: forall (cs :: [Kind -> Constraint]) k (i :: FREE cs Test k). (i ~> ('EMB StringTy :: FREE cs Test k)) %1 -> i ~> ('EMB StringTy :: FREE cs Test k) Source Comments #

test2 :: forall (cs :: [Kind -> Constraint]) k (i :: FREE cs Test k). HasBinaryProducts (FREE cs Test k) => (i ~> ('EMB StringTy :: FREE cs Test k)) -> i ~> (('EMB StringTy :: FREE cs Test k) *! ('EMB StringTy :: FREE cs Test k)) Source Comments #

data Interp a (b :: DISCRETE TestTy) where Source Comments #

Constructors

Interp :: forall (b :: DISCRETE TestTy) a. Ob b => (a ~> (Interp % b)) -> Interp a b 

Instances

Instances details
Profunctor Interp Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

dimap :: forall c a (b :: DISCRETE TestTy) (d :: DISCRETE TestTy). (c ~> a) -> (b ~> d) -> Interp a b -> Interp c d Source Comments #

(\\) :: forall a (b :: DISCRETE TestTy) r. ((Ob a, Ob b) => r) -> Interp a b -> r Source Comments #

Representable Interp Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Associated Types

type Interp % IntTy 
Instance details

Defined in Proarrow.Category.Instance.Free

type Interp % IntTy = Int
type Interp % StringTy 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

index :: forall a (b :: DISCRETE TestTy). Interp a b -> a ~> (Interp % b) Source Comments #

tabulate :: forall (b :: DISCRETE TestTy) a. Ob b => (a ~> (Interp % b)) -> Interp a b Source Comments #

repMap :: forall (a :: DISCRETE TestTy) (b :: DISCRETE TestTy). (a ~> b) -> (Interp % a) ~> (Interp % b) Source Comments #

type Interp % IntTy Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

type Interp % IntTy = Int
type Interp % StringTy Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Free

Orphan instances

CategoryOf Symbol Source Comments # 
Instance details

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Free

type (~>) = (:~:) :: Symbol -> Symbol -> Type
type Ob (a :: Symbol) 
Instance details

Defined in Proarrow.Category.Instance.Free

type Ob (a :: Symbol) = ()
Profunctor ((:~:) :: Symbol -> Symbol -> Type) Source Comments # 
Instance details

Methods

dimap :: forall (c :: Symbol) (a :: Symbol) (b :: Symbol) (d :: Symbol). (c ~> a) -> (b ~> d) -> (a :~: b) -> c :~: d Source Comments #

(\\) :: forall (a :: Symbol) (b :: Symbol) r. ((Ob a, Ob b) => r) -> (a :~: b) -> r Source Comments #

Promonad ((:~:) :: Symbol -> Symbol -> Type) Source Comments # 
Instance details

Methods

id :: forall (a :: Symbol). Ob a => a :~: a Source Comments #

(.) :: forall (b :: Symbol) (c :: Symbol) (a :: Symbol). (b :~: c) -> (a :~: b) -> a :~: c Source Comments #