| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Category.Instance.Simplex
Contents
Synopsis
- suc :: forall (a :: Nat) (b :: Nat). Simplex a b -> Simplex ('S a) ('S b)
- type (+) (n :: Nat) (m :: Nat) = Plus n m
- data family Forget :: Nat +-> Type
- class (forall (b :: Nat) (c :: Nat). Rules a b c, SNatI a, Typeable a) => IsNat (a :: Nat) where
- data family Pick :: Type -> OPPOSITE Nat +-> Type
- data family Replicate :: k -> Nat +-> k
- class ((a + 'Z) ~ a, (a + 'S b) ~ 'S (a + b), ((a + b) + c) ~ (a + (b + c))) => Rules (a :: Nat) (b :: Nat) (c :: Nat)
- data SNat (a :: Nat) where
- data Simplex (a :: Nat) (b :: Nat) where
- data Nat
Documentation
class (forall (b :: Nat) (c :: Nat). Rules a b c, SNatI a, Typeable a) => IsNat (a :: Nat) where Source Github #
data family Pick :: Type -> OPPOSITE Nat +-> Type Source Github #
class ((a + 'Z) ~ a, (a + 'S b) ~ 'S (a + b), ((a + b) + c) ~ (a + (b + c))) => Rules (a :: Nat) (b :: Nat) (c :: Nat) Source Github #
data Simplex (a :: Nat) (b :: Nat) where Source Github #
Constructors
| ZZ :: Simplex 'Z 'Z | |
| Y :: forall (a :: Nat) (y :: Nat). Simplex a y -> Simplex a ('S y) | |
| X :: forall (x :: Nat) (y :: Nat). Simplex x ('S y) -> Simplex ('S x) ('S y) |
Nat natural numbers.
Better than GHC's built-in Nat for some use cases.
Instances
| Arbitrary Nat Source Github # | |||||||||
| CoArbitrary Nat Source Github # | |||||||||
| Function Nat Source Github # | |||||||||
| NFData Nat Source Github # | |||||||||
| Data Nat Source Github # | |||||||||
Defined in Data.Nat Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Nat -> c Nat Github # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Nat Github # toConstr :: Nat -> Constr Github # dataTypeOf :: Nat -> DataType Github # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Nat) Github # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Nat) Github # gmapT :: (forall b. Data b => b -> b) -> Nat -> Nat Github # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Nat -> r Github # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Nat -> r Github # gmapQ :: (forall d. Data d => d -> u) -> Nat -> [u] Github # gmapQi :: Int -> (forall d. Data d => d -> u) -> Nat -> u Github # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Nat -> m Nat Github # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Nat -> m Nat Github # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Nat -> m Nat Github # | |||||||||
| Enum Nat Source Github # | |||||||||
Defined in Data.Nat | |||||||||
| Num Nat Source Github # | |||||||||
| Integral Nat Source Github # | |||||||||
| Real Nat Source Github # | |||||||||
| Show Nat Source Github # | To see explicit structure, use | ||||||||
| Eq Nat Source Github # | |||||||||
| Ord Nat Source Github # | |||||||||
| Hashable Nat Source Github # | |||||||||
| Monoidal Nat Source Github # | Addition as monoidal tensor. | ||||||||
Defined in Proarrow.Category.Instance.Simplex Associated Types
Methods withOb2 :: forall (a :: Nat) (b :: Nat) r. (Ob a, Ob b) => (Ob (a ** b) => r) -> r Source Github # leftUnitor :: forall (a :: Nat). Ob a => ((Unit :: Nat) ** a) ~> a Source Github # leftUnitorInv :: forall (a :: Nat). Ob a => a ~> ((Unit :: Nat) ** a) Source Github # rightUnitor :: forall (a :: Nat). Ob a => (a ** (Unit :: Nat)) ~> a Source Github # rightUnitorInv :: forall (a :: Nat). Ob a => a ~> (a ** (Unit :: Nat)) Source Github # associator :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Ob a, Ob b, Ob c) => ((a ** b) ** c) ~> (a ** (b ** c)) Source Github # associatorInv :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Ob a, Ob b, Ob c) => (a ** (b ** c)) ~> ((a ** b) ** c) Source Github # | |||||||||
| CategoryOf Nat Source Github # | The (augmented) simplex category is the category of finite ordinals and order preserving maps. | ||||||||
Defined in Proarrow.Category.Instance.Simplex Associated Types
| |||||||||
| HasInitialObject Nat Source Github # | |||||||||
Defined in Proarrow.Category.Instance.Simplex Associated Types
| |||||||||
| HasTerminalObject Nat Source Github # | |||||||||
Defined in Proarrow.Category.Instance.Simplex Associated Types
| |||||||||
| Universe Nat Source Github # |
Since: fin-0.1.2 | ||||||||
| Category LEProof Source Github # | The other variant ( | ||||||||
| TestEquality SNat Source Github # | |||||||||
Defined in Data.Type.Nat | |||||||||
| Promonad Simplex Source Github # | |||||||||
| Monoid 'Z Source Github # | |||||||||
| EqP Fin Source Github # |
Since: fin-0.2.2 | ||||||||
| EqP SNat Source Github # | Since: fin-0.2.2 | ||||||||
| GNFData SNat Source Github # | Since: fin-0.2.1 | ||||||||
| GCompare SNat Source Github # | Since: fin-0.2.1 | ||||||||
| GEq SNat Source Github # | Since: fin-0.2.1 | ||||||||
| GShow Fin Source Github # | Since: fin-0.2.2 | ||||||||
| GShow SNat Source Github # | Since: fin-0.2.1 | ||||||||
Defined in Data.Type.Nat | |||||||||
| OrdP Fin Source Github # |
Since: fin-0.2.2 | ||||||||
| OrdP SNat Source Github # | Since: fin-0.2.2 | ||||||||
| MonoidalProfunctor Simplex Source Github # | |||||||||
| Profunctor Simplex Source Github # | |||||||||
| FunctorForRep Forget Source Github # | |||||||||
| Monoid m => FunctorForRep (Replicate m :: Nat +-> k) Source Github # | |||||||||
| Monoid ('S 'Z) Source Github # | |||||||||
| FunctorForRep (Pick a :: OPPOSITE Nat +-> Type) Source Github # | |||||||||
| type Unit Source Github # | |||||||||
Defined in Proarrow.Category.Instance.Simplex | |||||||||
| type (~>) Source Github # | |||||||||
Defined in Proarrow.Category.Instance.Simplex | |||||||||
| type InitialObject Source Github # | |||||||||
Defined in Proarrow.Category.Instance.Simplex | |||||||||
| type TerminalObject Source Github # | |||||||||
Defined in Proarrow.Category.Instance.Simplex | |||||||||
| type Ob (a :: Nat) Source Github # | |||||||||
Defined in Proarrow.Category.Instance.Simplex | |||||||||
| type (a :: Nat) ** (b :: Nat) Source Github # | |||||||||
Defined in Proarrow.Category.Instance.Simplex | |||||||||
| type Forget @ (n :: Nat) Source Github # | |||||||||
Defined in Proarrow.Category.Instance.Simplex | |||||||||
| type UN 'FR ('FR n :: FINREL) Source Github # | |||||||||
Defined in Proarrow.Category.Instance.FinRel | |||||||||
| type UN 'FS ('FS n :: FINSET) Source Github # | |||||||||
Defined in Proarrow.Category.Instance.FinSet | |||||||||
| type (Replicate m :: Nat +-> k) @ 'Z Source Github # | |||||||||
| type (Replicate m :: Nat +-> k) @ ('S b :: Nat) Source Github # | |||||||||
| type UN ('M :: Nat -> MatK a) ('M n :: MatK a) Source Github # | |||||||||
| type (Pick a :: OPPOSITE Nat +-> Type) @ ('OP n :: OPPOSITE Nat) Source Github # | |||||||||
Orphan instances
| Monoidal Nat Source Github # | Addition as monoidal tensor. | ||||||||
Associated Types
Methods withOb2 :: forall (a :: Nat) (b :: Nat) r. (Ob a, Ob b) => (Ob (a ** b) => r) -> r Source Github # leftUnitor :: forall (a :: Nat). Ob a => ((Unit :: Nat) ** a) ~> a Source Github # leftUnitorInv :: forall (a :: Nat). Ob a => a ~> ((Unit :: Nat) ** a) Source Github # rightUnitor :: forall (a :: Nat). Ob a => (a ** (Unit :: Nat)) ~> a Source Github # rightUnitorInv :: forall (a :: Nat). Ob a => a ~> (a ** (Unit :: Nat)) Source Github # associator :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Ob a, Ob b, Ob c) => ((a ** b) ** c) ~> (a ** (b ** c)) Source Github # associatorInv :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Ob a, Ob b, Ob c) => (a ** (b ** c)) ~> ((a ** b) ** c) Source Github # | |||||||||
| CategoryOf Nat Source Github # | The (augmented) simplex category is the category of finite ordinals and order preserving maps. | ||||||||
Associated Types
| |||||||||
| HasInitialObject Nat Source Github # | |||||||||
Associated Types
| |||||||||
| HasTerminalObject Nat Source Github # | |||||||||
Associated Types
| |||||||||
| Monoid 'Z Source Github # | |||||||||
| Monoid ('S 'Z) Source Github # | |||||||||