proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Instance.Unit

Description

The terminal category: the unit kind () with its single object '() and only the identity arrow Unit.

Documentation

data Unit (a :: ()) (b :: ()) where Source Github #

Constructors

Unit :: Unit '() '() 

Instances

Instances details
DaggerProfunctor Unit Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Unit

Methods

dagger :: forall (a :: ()) (b :: ()). Unit a b -> Unit b a Source Github #

Promonad Unit Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Unit

Methods

id :: forall (a :: ()). Ob a => Unit a a Source Github #

(.) :: forall (b :: ()) (c :: ()) (a :: ()). Unit b c -> Unit a b -> Unit a c Source Github #

Finitary Unit Source Github #

The one-object category has one arrow.

Instance details

Defined in Proarrow.Category.Enriched.Finitary

Methods

size :: forall (a :: ()) (b :: ()). (Ob a, Ob b) => Natural Source Github #

toIndex :: forall (a :: ()) (b :: ()). (Ob a, Ob b) => Unit a b -> Natural Source Github #

fromIndex :: forall (a :: ()) (b :: ()). (Ob a, Ob b) => Natural -> Unit a b Source Github #

elements :: forall (a :: ()) (b :: ()). (Ob a, Ob b) => [Unit a b] Source Github #

DecidableProfunctor Unit Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Unit

Associated Types

type Holds Unit (a :: ()) (b :: ()) 
Instance details

Defined in Proarrow.Category.Instance.Unit

type Holds Unit (a :: ()) (b :: ()) = 'TRU

Methods

decide :: forall (a :: ()) (b :: ()). (Ob a, Ob b) => Decision Unit a b (Holds Unit a b) Source Github #

toHolds :: forall (a :: ()) (b :: ()) r. Unit a b -> ((Holds Unit a b ~ 'TRU, Ob a, Ob b) => r) -> r Source Github #

ThinProfunctor Unit Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Unit

Associated Types

type HasArrow Unit (a :: ()) (b :: ()) 
Instance details

Defined in Proarrow.Category.Instance.Unit

type HasArrow Unit (a :: ()) (b :: ()) = a ~ b

Methods

arr :: forall (a :: ()) (b :: ()). (Ob a, Ob b, HasArrow Unit a b) => Unit a b Source Github #

withArr :: forall (a :: ()) (b :: ()) r. Unit a b -> ((HasArrow Unit a b, Ob a, Ob b) => r) -> r Source Github #

MonoidalProfunctor Unit Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal

Methods

one :: Unit (Unit :: ()) (Unit :: ()) Source Github #

(**) :: forall (x1 :: ()) (x2 :: ()) (y1 :: ()) (y2 :: ()). Unit x1 x2 -> Unit y1 y2 -> Unit (x1 ** y1) (x2 ** y2) Source Github #

Profunctor Unit Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Unit

Methods

dimap :: forall (c :: ()) (a :: ()) (b :: ()) (d :: ()). (c ~> a) -> (b ~> d) -> Unit a b -> Unit c d Source Github #

lmap :: forall (c :: ()) (a :: ()) (b :: ()). (c ~> a) -> Unit a b -> Unit c b Source Github #

rmap :: forall (b :: ()) (d :: ()) (a :: ()). (b ~> d) -> Unit a b -> Unit a d Source Github #

(\\) :: forall (a :: ()) (b :: ()) r. ((Ob a, Ob b) => r) -> Unit a b -> r Source Github #

type HasArrow Unit (a :: ()) (b :: ()) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Unit

type HasArrow Unit (a :: ()) (b :: ()) = a ~ b
type Holds Unit (a :: ()) (b :: ()) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Unit

type Holds Unit (a :: ()) (b :: ()) = 'TRU

Orphan instances

Enumerable () Source Github # 
Instance details

Methods

withIndex :: forall (a :: ()) r. Ob a => (KnownIndex a => r) -> r Source Github #

withOb :: forall (a :: ()) r. KnownIndex a => (Ob a => r) -> r Source Github #

atOb :: forall (i :: Nat). SNat i -> AtOb () (At () i) Source Github #

Finite () Source Github # 
Instance details

Associated Types

type Objects () 
Instance details

Defined in Proarrow.Category.Instance.Unit

type Objects () = '['()]

Methods

finite :: IndexedList (Objects ()) Source Github #

withAtLookup :: forall (i :: Nat) r. SNat i -> (Lookup (Objects ()) i ~ At () i => r) -> r Source Github #

Indexed () Source Github # 
Instance details

Associated Types

type Index (a :: ()) 
Instance details

Defined in Proarrow.Category.Instance.Unit

type Index (a :: ()) = IndexOf a (Objects ())
type At () i 
Instance details

Defined in Proarrow.Category.Instance.Unit

type At () i = Lookup (Objects ()) i
CategoryOf () Source Github #

The category with one object, the terminal category.

Instance details

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Unit

type (~>) = Unit
type Ob (a :: ()) 
Instance details

Defined in Proarrow.Category.Instance.Unit

type Ob (a :: ()) = a ~ '()