concat-classes-0.3.0.0: Constrained categories
Safe HaskellSafe-Inferred
LanguageHaskell2010

ConCat.AltCat

Description

Alternative interface to the class operations from ConCat.Category, so as not to get inlined too eagerly to optimize.

Synopsis

Documentation

type KnownNat2 m n = (KnownNat m, KnownNat n) Source #

class (IxProductCat k h, Functor h, Ok2 k a b) => OkFork h a b k Source #

Instances

Instances details
(IxProductCat k h, Functor h, Ok2 k a b) => OkFork h a b k Source # 
Instance details

Defined in ConCat.AltCat

class Uncurriable k a b where Source #

Repeatedly uncurried version of a -> b

Minimal complete definition

Nothing

Associated Types

type UncDom a b Source #

type UncDom a b = a

type UncRan a b Source #

type UncRan a b = b

Methods

uncurries :: (a `k` b) -> UncDom a b `k` UncRan a b Source #

default uncurries :: (UncDom a b ~ a, UncRan a b ~ b) => (a `k` b) -> UncDom a b `k` UncRan a b Source #

fiddly_foo_unc :: k a b -> () Source #

Instances

Instances details
Uncurriable k a () Source # 
Instance details

Defined in ConCat.AltCat

Associated Types

type UncDom a () Source #

type UncRan a () Source #

Methods

uncurries :: k a () -> k (UncDom a ()) (UncRan a ()) Source #

fiddly_foo_unc :: k a () -> () Source #

Uncurriable k a Bool Source # 
Instance details

Defined in ConCat.AltCat

Associated Types

type UncDom a Bool Source #

type UncRan a Bool Source #

Methods

uncurries :: k a Bool -> k (UncDom a Bool) (UncRan a Bool) Source #

fiddly_foo_unc :: k a Bool -> () Source #

Uncurriable k a Double Source # 
Instance details

Defined in ConCat.AltCat

Associated Types

type UncDom a Double Source #

type UncRan a Double Source #

Methods

uncurries :: k a Double -> k (UncDom a Double) (UncRan a Double) Source #

fiddly_foo_unc :: k a Double -> () Source #

Uncurriable k a Float Source # 
Instance details

Defined in ConCat.AltCat

Associated Types

type UncDom a Float Source #

type UncRan a Float Source #

Methods

uncurries :: k a Float -> k (UncDom a Float) (UncRan a Float) Source #

fiddly_foo_unc :: k a Float -> () Source #

Uncurriable k a Int Source # 
Instance details

Defined in ConCat.AltCat

Associated Types

type UncDom a Int Source #

type UncRan a Int Source #

Methods

uncurries :: k a Int -> k (UncDom a Int) (UncRan a Int) Source #

fiddly_foo_unc :: k a Int -> () Source #

Uncurriable k a (c :* d) Source # 
Instance details

Defined in ConCat.AltCat

Associated Types

type UncDom a (c :* d) Source #

type UncRan a (c :* d) Source #

Methods

uncurries :: k a (c :* d) -> k (UncDom a (c :* d)) (UncRan a (c :* d)) Source #

fiddly_foo_unc :: k a (c :* d) -> () Source #

Uncurriable k a (c :+ d) Source # 
Instance details

Defined in ConCat.AltCat

Associated Types

type UncDom a (c :+ d) Source #

type UncRan a (c :+ d) Source #

Methods

uncurries :: k a (c :+ d) -> k (UncDom a (c :+ d)) (UncRan a (c :+ d)) Source #

fiddly_foo_unc :: k a (c :+ d) -> () Source #

(ClosedCat k, Uncurriable k (a :* b) c, Ok3 k a b c) => Uncurriable k a (b -> c) Source # 
Instance details

Defined in ConCat.AltCat

Associated Types

type UncDom a (b -> c) Source #

type UncRan a (b -> c) Source #

Methods

uncurries :: k a (b -> c) -> k (UncDom a (b -> c)) (UncRan a (b -> c)) Source #

fiddly_foo_unc :: k a (b -> c) -> () Source #

type Diagonal h = (Representable h, Eq (Rep h)) Source #

id :: (Category k, Ok k a) => a `k` a Source #

C.id without the eager inlining

join :: forall k a c d. (MCoproductCat k, Ok3 k a c d) => ((c `k` a) :* (d `k` a)) -> Coprod k c d `k` a Source #

Convenient alias for uncurry (|||)

uncurry :: forall k a b c. (ClosedCat k, Ok3 k a b c) => (a `k` Exp k b c) -> Prod k a b `k` c Source #

C.uncurry without the eager inlining

(***) :: forall k a b c d. (MonoidalPCat k, Ok4 k a b c d) => (a `k` c) -> (b `k` d) -> Prod k a b `k` Prod k c d infixr 3 Source #

(C.*** ) without the eager inlining

trace :: (TracedCat k, Ok3 k a b c) => ((a :* c) `k` (b :* c)) -> a `k` b Source #

C.trace without the eager inlining

first :: forall k a c b. (MonoidalPCat k, Ok3 k a b c) => (a `k` c) -> Prod k a b `k` Prod k c b Source #

C.first without the eager inlining

(|||) :: forall k a c d. (MCoproductCat k, Ok3 k a c d) => (c `k` a) -> (d `k` a) -> Coprod k c d `k` a infixr 2 Source #

(C.|||) without the eager inlining

loop :: (LoopCat k, Ok3 k s a b) => ((a :* s) `k` (b :* s)) -> a `k` b Source #

C.loop without the eager inlining

const :: (ConstCat k b, Ok k a) => b -> a `k` ConstObj k b Source #

C.const without the eager inlining

(.) :: forall k b c a. (Category k, Ok3 k a b c) => (b `k` c) -> (a `k` b) -> a `k` c infixr 9 Source #

(C..) without the eager inlining

(+++) :: forall k a b c d. (MonoidalSCat k, Ok4 k a b c d) => (c `k` a) -> (d `k` b) -> Coprod k c d `k` Coprod k a b infixr 2 Source #

(C.+++ ) without the eager inlining

apply :: forall k a b. (ClosedCat k, Ok2 k a b) => Prod k (Exp k a b) a `k` b Source #

C.apply without the eager inlining

curry :: (ClosedCat k, Ok3 k a b c) => (Prod k a b `k` c) -> a `k` Exp k b c Source #

C.curry without the eager inlining

dup :: forall k a. (ProductCat k, Ok k a) => a `k` Prod k a a Source #

C.dup without the eager inlining

left :: forall k a c b. (MonoidalSCat k, Ok3 k a b c) => (a `k` c) -> Coprod k a b `k` Coprod k c b Source #

C.left without the eager inlining

right :: forall k a b d. (MonoidalSCat k, Ok3 k a b d) => (b `k` d) -> Coprod k a b `k` Coprod k a d Source #

C.right without the eager inlining

second :: forall k a b d. (MonoidalPCat k, Ok3 k a b d) => (b `k` d) -> Prod k a b `k` Prod k a d Source #

C.second without the eager inlining

(&&&) :: forall k a c d. (MProductCat k, Ok3 k a c d) => (a `k` c) -> (a `k` d) -> a `k` Prod k c d infixr 3 Source #

combineSum :: forall m n. KnownNat2 m n => (Finite m :+ Finite n) -> Finite (m + n) Source #

separateSum :: forall m n. KnownNat2 m n => Finite (m + n) -> Finite m :+ Finite n Source #

delay :: (DelayCat k, Ok k a) => a -> a `k` a Source #

C.delay without the eager inlining

diag :: Diagonal h => a -> a -> h (h a) Source #

equal :: EqCat k a => Prod k a a `k` BoolOf k Source #

C.equal without the eager inlining

pair :: forall k a b. (ClosedCat k, Ok2 k a b) => a `k` Exp k b (Prod k a b) Source #

reveal :: (a `k` b) -> a `k` b Source #

Dummy identity function to trigger rewriting of non-inlining operations to inling operations.

exl :: (ProductCat k, Ok2 k a b) => Prod k a b `k` a Source #

C.exl without the eager inlining

exr :: (ProductCat k, Ok2 k a b) => Prod k a b `k` b Source #

C.exr without the eager inlining

lassocP :: forall k a b c. (AssociativePCat k, Ok3 k a b c) => Prod k a (Prod k b c) `k` Prod k (Prod k a b) c Source #

C.lassocP without the eager inlining

rassocP :: forall k a b c. (AssociativePCat k, Ok3 k a b c) => Prod k (Prod k a b) c `k` Prod k a (Prod k b c) Source #

C.rassocP without the eager inlining

swapP :: forall k a b. (BraidedPCat k, Ok2 k a b) => Prod k a b `k` Prod k b a Source #

C.swapP without the eager inlining

lassocS :: forall k a b c. (AssociativeSCat k, Ok3 k a b c) => Coprod k a (Coprod k b c) `k` Coprod k (Coprod k a b) c Source #

C.lassocS without the eager inlining

inl :: (CoproductCat k, Ok2 k a b) => a `k` Coprod k a b Source #

C.inl without the eager inlining

inr :: (CoproductCat k, Ok2 k a b) => b `k` Coprod k a b Source #

C.inr without the eager inlining

rassocS :: forall k a b c. (AssociativeSCat k, Ok3 k a b c) => Coprod k (Coprod k a b) c `k` Coprod k a (Coprod k b c) Source #

C.rassocS without the eager inlining

swapS :: forall k a b. (BraidedSCat k, Ok2 k a b) => Coprod k a b `k` Coprod k b a Source #

C.swapS without the eager inlining

jam :: (CoproductCat k, Ok k a) => Coprod k a a `k` a Source #

C.jam without the eager inlining

zeroC :: forall k a b. (AbelianCat k, Ok2 k a b) => a `k` b Source #

C.zeroC without the eager inlining

ti :: (CoterminalCat k, Ok k a) => Counit k `k` a Source #

C.ti without the eager inlining

it :: (TerminalCat k, Ok k a) => a `k` Unit k Source #

C.it without the eager inlining

plusC :: forall k a b. (AbelianCat k, Ok2 k a b) => Binop (a `k` b) Source #

C.plusC without the eager inlining

jamP :: (CoproductPCat k, Ok k a) => CoprodP k a a `k` a Source #

C.jamP without the eager inlining

inlP :: (CoproductPCat k, Ok2 k a b) => a `k` CoprodP k a b Source #

C.inlP without the eager inlining

inrP :: (CoproductPCat k, Ok2 k a b) => b `k` CoprodP k a b Source #

C.inrP without the eager inlining

(||||) :: forall k a c d. (MCoproductPCat k, Ok3 k a c d) => (c `k` a) -> (d `k` a) -> CoprodP k c d `k` a infixr 2 Source #

(C.||||) without the eager inlining

scale :: ScalarCat k a => a -> a `k` a Source #

C.scale without the eager inlining

distl :: forall k a u v. (DistribCat k, Ok3 k a u v) => Prod k a (Coprod k u v) `k` Coprod k (Prod k a u) (Prod k a v) Source #

C.distl without the eager inlining

distr :: forall k u v b. (DistribCat k, Ok3 k u v b) => Prod k (Coprod k u v) b `k` Coprod k (Prod k u b) (Prod k v b) Source #

C.distr without the eager inlining

lunit :: (UnitCat k, Ok k a) => a `k` Prod k (Unit k) a Source #

C.lunit without the eager inlining

lcounit :: (UnitCat k, Ok k a) => Prod k (Unit k) a `k` a Source #

C.lcounit without the eager inlining

runit :: (UnitCat k, Ok k a) => a `k` Prod k a (Unit k) Source #

C.runit without the eager inlining

rcounit :: (UnitCat k, Ok k a) => Prod k a (Unit k) `k` a Source #

C.rcounit without the eager inlining

constFun :: forall k p a b. (ClosedCat k, Ok3 k p a b) => (a `k` b) -> p `k` Exp k a b Source #

unitArrow :: (ConstCat k b, Ok k (Unit k)) => b -> Unit k `k` ConstObj k b Source #

C.unitArrow without the eager inlining

abstC :: RepCat k a r => r `k` a Source #

C.abstC without the eager inlining

notC :: BoolCat k => BoolOf k `k` BoolOf k Source #

C.notC without the eager inlining

andC :: BoolCat k => Prod k (BoolOf k) (BoolOf k) `k` BoolOf k Source #

C.andC without the eager inlining

orC :: BoolCat k => Prod k (BoolOf k) (BoolOf k) `k` BoolOf k Source #

C.orC without the eager inlining

xorC :: BoolCat k => Prod k (BoolOf k) (BoolOf k) `k` BoolOf k Source #

C.xorC without the eager inlining

notEqual :: EqCat k a => Prod k a a `k` BoolOf k Source #

C.notEqual without the eager inlining

lessThan :: OrdCat k a => Prod k a a `k` BoolOf k Source #

C.lessThan without the eager inlining

greaterThan :: OrdCat k a => Prod k a a `k` BoolOf k Source #

C.greaterThan without the eager inlining

lessThanOrEqual :: OrdCat k a => Prod k a a `k` BoolOf k Source #

C.lessThanOrEqual without the eager inlining

greaterThanOrEqual :: OrdCat k a => Prod k a a `k` BoolOf k Source #

C.greaterThanOrEqual without the eager inlining

coerceC :: CoerceCat k a b => a `k` b Source #

C.coerceC without the eager inlining

fmapC :: (FunctorCat k h, Ok2 k a b) => (a `k` b) -> h a `k` h b Source #

C.fmapC without the eager inlining

unzipC :: (FunctorCat k h, Ok2 k a b) => h (a :* b) `k` (h a :* h b) Source #

C.unzipC without the eager inlining

pointC :: PointedCat k h a => a `k` h a Source #

C.pointC without the eager inlining

negateC :: NumCat k a => a `k` a Source #

C.negateC without the eager inlining

addC :: NumCat k a => Prod k a a `k` a Source #

C.addC without the eager inlining

subC :: NumCat k a => Prod k a a `k` a Source #

C.subC without the eager inlining

mulC :: NumCat k a => Prod k a a `k` a Source #

C.mulC without the eager inlining

powIC :: (NumCat k a, Ok k Int) => Prod k a Int `k` a Source #

C.powIC without the eager inlining

divC :: IntegralCat k a => Prod k a a `k` a Source #

C.divC without the eager inlining

modC :: IntegralCat k a => Prod k a a `k` a Source #

C.modC without the eager inlining

recipC :: FractionalCat k a => a `k` a Source #

C.recipC without the eager inlining

divideC :: FractionalCat k a => Prod k a a `k` a Source #

C.divideC without the eager inlining

expC :: FloatingCat k a => a `k` a Source #

C.expC without the eager inlining

logC :: FloatingCat k a => a `k` a Source #

C.logC without the eager inlining

cosC :: FloatingCat k a => a `k` a Source #

C.cosC without the eager inlining

sinC :: FloatingCat k a => a `k` a Source #

C.sinC without the eager inlining

sqrtC :: FloatingCat k a => a `k` a Source #

C.sqrtC without the eager inlining

tanhC :: FloatingCat k a => a `k` a Source #

C.tanhC without the eager inlining

floorC :: RealFracCat k a b => a `k` b Source #

C.floorC without the eager inlining

ceilingC :: RealFracCat k a b => a `k` b Source #

C.ceilingC without the eager inlining

truncateC :: RealFracCat k a b => a `k` b Source #

C.truncateC without the eager inlining

fromIntegralC :: FromIntegralCat k a b => a `k` b Source #

C.fromIntegralC without the eager inlining

bottomC :: BottomCat k a b => a `k` b Source #

C.bottomC without the eager inlining

ifC :: IfCat k a => Prod k (BoolOf k) (Prod k a a) `k` a Source #

C.ifC without the eager inlining

reprC :: RepCat k a r => a `k` r Source #

C.reprC without the eager inlining

tabulateC :: (RepresentableCat k f, Ok k a) => (Rep f -> a) `k` f a Source #

C.tabulateC without the eager inlining

indexC :: (RepresentableCat k f, Ok k a) => f a `k` (Rep f -> a) Source #

C.indexC without the eager inlining

minC :: (MinMaxCat k a, Ok k a) => Prod k a a `k` a Source #

C.minC without the eager inlining

maxC :: (MinMaxCat k a, Ok k a) => Prod k a a `k` a Source #

C.maxC without the eager inlining

succC :: EnumCat k a => a `k` a Source #

C.succC without the eager inlining

predC :: EnumCat k a => a `k` a Source #

C.predC without the eager inlining

divModC :: (MProductCat k, IntegralCat k a, Ok k a) => Prod k a a `k` Prod k a a Source #

C.divModC without the eager inlining

unknownC :: UnknownCat k a b => a `k` b Source #

C.unknownC without the eager inlining

zipC :: (ZipCat k h, Ok2 k a b) => (h a :* h b) `k` h (a :* b) Source #

C.zipC without the eager inlining

zapC :: (ZapCat k h, Ok2 k a b) => h (a `k` b) -> h a `k` h b Source #

C.zapC without the eager inlining

sumAC :: AddCat k h a => h a `k` a Source #

C.sumAC without the eager inlining

sequenceAC :: (TraversableCat k t f, Ok k a) => t (f a) `k` f (t a) Source #

C.sequenceAC without the eager inlining

distributeC :: (DistributiveCat k g f, Ok k a) => f (g a) `k` g (f a) Source #

C.distributeC without the eager inlining

strength :: (Strong k h, Ok2 k a b) => (a :* h b) `k` h (a :* b) Source #

C.strength without the eager inlining

crossF :: (IxMonoidalPCat k h, Ok2 k a b) => h (a `k` b) -> h a `k` h b Source #

C.crossF without the eager inlining

exF :: (IxProductCat k h, Ok k a) => h (h a `k` a) Source #

C.exF without the eager inlining

forkF :: (IxProductCat k h, Ok2 k a b) => h (a `k` b) -> a `k` h b Source #

C.forkF without the eager inlining

replF :: (IxProductCat k h, Ok k a) => a `k` h a Source #

C.replF without the eager inlining

minimumC :: (MinMaxFunctorCat k h a, OkFunctor k h, Ok k a) => h a `k` a Source #

C.minimumC without the eager inlining

maximumC :: (MinMaxFunctorCat k h a, OkFunctor k h, Ok k a) => h a `k` a Source #

C.maximumC without the eager inlining

minimumCF :: (MinMaxFFunctorCat k h a, OkFunctor k h, Ok k a) => h a -> a :* (h a `k` a) Source #

C.minimumCF without the eager inlining

maximumCF :: (MinMaxFFunctorCat k h a, OkFunctor k h, Ok k a) => h a -> a :* (h a `k` a) Source #

C.maximumCF without the eager inlining

inPF :: (IxCoproductPCat k h, Ok k a) => h (a `k` h a) Source #

C.inPF without the eager inlining

joinPF :: (IxCoproductPCat k h, Ok2 k a b) => h (b `k` a) -> h b `k` a Source #

C.joinPF without the eager inlining

jamPF :: (IxCoproductPCat k h, Ok k a) => h a `k` a Source #

C.jamPF without the eager inlining

unFinite :: (FiniteCat k, KnownNat n) => Finite n `k` Int Source #

C.unFinite without the eager inlining

unsafeFinite :: (FiniteCat k, KnownNat n) => Int `k` Finite n Source #

C.unsafeFinite without the eager inlining

conceal :: (a `k` b) -> a `k` b Source #

Dummy identity function to delay rewriting of non-inlining operations to inling operations.

secondFirst :: forall k a b d. (MonoidalPCat k, BraidedPCat k, Ok3 k a b d) => (b `k` d) -> (a :* b) `k` (a :* d) Source #

crossSecondFirst :: forall k a b c d. (MonoidalPCat k, Ok4 k a b c d) => (a `k` c) -> (b `k` d) -> (a :* b) `k` (c :* d) Source #

rightLeft :: forall k a b d. (MCoproductCat k, BraidedSCat k, Ok3 k a b d) => (b `k` d) -> (a :+ b) `k` (a :+ d) Source #

plusRightLeft :: forall k a b c d. (MCoproductCat k, Ok4 k a b c d) => (a `k` c) -> (b `k` d) -> (a :+ b) `k` (c :+ d) Source #

fmapC' :: (IxProductCat k h, Representable h, Zip h, Pointed h, Ok2 k a b) => (a `k` b) -> h a `k` h b Source #

toCcc' :: forall k a b. (a -> b) -> a `k` b Source #

Pseudo function to trigger rewriting to TOCCC form.

bottomRep :: forall k a b r. (Category k, RepCat k b r, BottomCat k a r, Ok3 k a b r) => a `k` b Source #

funConst :: forall k a b. (ClosedCat k, TerminalCat k, UnitCat k, Ok2 k a b) => (() `k` (a -> b)) -> a `k` b Source #

toCcc'' :: forall k a b ev. ev -> (a -> b) -> a `k` b Source #

Internal function, annotated with available dictionaries

unCcc' :: forall k a b. (a `k` b) -> a -> b Source #

Pseudo function to stop rewriting from TOCCC form.

toCcc :: forall k a b. (a -> b) -> a `k` b Source #

Pseudo function to trigger rewriting to CCC form, plus a reveal for inlining.

ccc :: forall k a b. (a -> b) -> a `k` b Source #

Deprecated: ccc is now called toCcc

unCcc :: forall k a b. (a `k` b) -> a -> b Source #

Pseudo function to stop rewriting from CCC form.

id2 :: forall k a b. (MonoidalPCat k, Ok2 k a b) => (a :* b) `k` (a :* b) Source #

idProd :: forall k a b. (Category k, OkProd k, Ok2 k a b) => (a :* b) `k` (a :* b) Source #

coco :: forall k a b c. (CoerceCat k a b, CoerceCat k b c, TransitiveCon (CoerceCat k)) => a `k` c Source #

coco' :: forall k a b c. (CoerceCat k a b, CoerceCat k b c, TransitiveCon (CoerceCat k)) => b :* (a `k` c) Source #

zipWithC :: Zip h => (a -> b -> c) -> h a -> h b -> h c Source #

fmapId :: forall k h a. (Category k, FunctorCat k h, Ok k a) => h a `k` h a Source #

unzipFmapFork :: forall k h a b c. (MProductCat k, Ok3 k a b c, FunctorCat k h) => (a `k` b) -> (a `k` c) -> h a `k` (h b :* h c) Source #

traverseC :: forall k t f a b. (Category k, FunctorCat k t, OkFunctor k f, TraversableCat k t f, Ok k a, Ok k b) => (a `k` f b) -> t a `k` f (t b) Source #

collectC :: (Distributive g, Functor f) => (a -> g b) -> f a -> g (f b) Source #

combineProd :: forall m n. KnownNat2 m n => (Finite m :* Finite n) -> Finite (m * n) Source #

separateProd :: forall m n. KnownNat2 m n => Finite (m * n) -> Finite m :* Finite n Source #

unitIf :: forall k. (TerminalCat k, BoolCat k) => IfT k (Unit k) Source #

prodIf :: forall k a b. (MonoidalPCat k, IfCat k a, IfCat k b) => IfT k (a :* b) Source #

twiceP :: (MonoidalPCat k, Ok2 k a c) => (a `k` c) -> Prod k a a `k` Prod k c c Source #

Apply to both parts of a product

funIf :: forall k a b. (MonoidalPCat k, ClosedCat k, Ok k a, IfCat k b) => IfT k (a -> b) Source #

repIf :: forall k a r. (RepCat k a r, MProductCat k, Ok k a, IfCat k r) => IfT k a Source #

transposeP :: forall k a b c d. (MProductCat k, Ok4 k a b c d) => Prod k (Prod k a b) (Prod k c d) `k` Prod k (Prod k a c) (Prod k b d) Source #

fork :: forall k a c d. (MProductCat k, Ok3 k a c d) => ((a `k` c) :* (a `k` d)) -> a `k` Prod k c d Source #

Convenient alias for uncurry (&&&)

unfork :: forall k a c d. (ProductCat k, Ok3 k a c d) => (a `k` Prod k c d) -> (a `k` c) :* (a `k` d) Source #

Inverse to uncurry (&&&)

unjoin :: forall k a c d. (CoproductCat k, Ok3 k a c d) => (Coprod k c d `k` a) -> (c `k` a) :* (d `k` a) Source #

Inverse to uncurry (|||)

joinP :: forall k a c d. (MCoproductPCat k, Ok3 k a c d, Additive a) => ((c `k` a) :* (d `k` a)) -> Prod k c d `k` a Source #

Convenient alias for uncurry (||||)

unjoinP :: forall k a c d. (MCoproductPCat k, C3 Additive a c d, Ok3 k a c d) => ((c :* d) `k` a) -> (c `k` a) :* (d `k` a) Source #

Inverse to uncurry (||||)

unjoinPF :: forall k h a b. (IxCoproductPCat k h, Functor h, Ok2 k a b) => (h b `k` a) -> h (b `k` a) Source #

Inverse to joinPF

unforkF :: forall k h a b. (IxProductCat k h, Functor h, Ok2 k a b) => (a `k` h b) -> h (a `k` b) Source #

Inverse to forkF

undistl :: forall k a u v. (MonoidalPCat k, MCoproductCat k, Ok3 k a u v) => ((a :* u) :+ (a :* v)) `k` (a :* (u :+ v)) Source #

Inverse to distl: (a * u) + (a * v) --> a * (u + v)

undistr :: forall k u v b. (MonoidalPCat k, MCoproductCat k, Ok3 k u v b) => ((u :* b) :+ (v :* b)) `k` ((u :+ v) :* b) Source #

Inverse to distr: (u * b) + (v * b) --> (u + v) * b

inDistr :: forall k a b c d w z. (MonoidalPCat k, MCoproductCat k, DistribCat k, Ok6 k a b c d w z) => (((a :* w) :+ (b :* w)) `k` ((c :* z) :+ (d :* z))) -> ((a :+ b) :* w) `k` ((c :+ d) :* z) Source #

inLassocP :: forall k a b c a' b' c'. (AssociativePCat k, Ok6 k a b c a' b' c') => (Prod k (Prod k a b) c `k` Prod k (Prod k a' b') c') -> Prod k a (Prod k b c) `k` Prod k a' (Prod k b' c') Source #

Operate on left-associated form

inRassocP :: forall a b c a' b' c' k. (AssociativePCat k, Ok6 k a b c a' b' c') => (Prod k a (Prod k b c) `k` Prod k a' (Prod k b' c')) -> Prod k (Prod k a b) c `k` Prod k (Prod k a' b') c' Source #

Operate on right-associated form

twiceS :: (MonoidalSCat k, Ok2 k a c) => (a `k` c) -> Coprod k a a `k` Coprod k c c Source #

Apply to both parts of a coproduct

inLassocS :: forall k a b c a' b' c'. (AssociativeSCat k, Ok6 k a b c a' b' c') => (Coprod k (Coprod k a b) c `k` Coprod k (Coprod k a' b') c') -> Coprod k a (Coprod k b c) `k` Coprod k a' (Coprod k b' c') Source #

Operate on left-associated form

inRassocS :: forall a b c a' b' c' k. (AssociativeSCat k, Ok6 k a b c a' b' c') => (Coprod k a (Coprod k b c) `k` Coprod k a' (Coprod k b' c')) -> Coprod k (Coprod k a b) c `k` Coprod k (Coprod k a' b') c' Source #

Operate on right-associated form

transposeS :: forall k a b c d. (MCoproductCat k, Ok4 k a b c d) => Coprod k (Coprod k a b) (Coprod k c d) `k` Coprod k (Coprod k a c) (Coprod k b d) Source #

data Finite (n :: Nat) Source #

Finite number type. Finite n is inhabited by exactly n values the range [0, n) including 0 but excluding n. Invariants:

getFinite x < natVal x
getFinite x >= 0

Instances

Instances details
KnownNat n => Bounded (Finite n)

Throws an error for Finite 0

Instance details

Defined in Data.Finite.Internal

KnownNat n => Enum (Finite n) 
Instance details

Defined in Data.Finite.Internal

Generic (Finite n) 
Instance details

Defined in Data.Finite.Internal

Associated Types

type Rep (Finite n) :: Type -> Type Source #

Methods

from :: Finite n -> Rep (Finite n) x Source #

to :: Rep (Finite n) x -> Finite n Source #

KnownNat n => Num (Finite n)

+, -, and * implement arithmetic modulo n. The fromInteger function raises an error for inputs outside of bounds.

Instance details

Defined in Data.Finite.Internal

KnownNat n => Read (Finite n) 
Instance details

Defined in Data.Finite.Internal

KnownNat n => Integral (Finite n)

quot and rem are the same as div and mod and they implement regular division of numbers in the range [0, n), not modular arithmetic.

Instance details

Defined in Data.Finite.Internal

Methods

quot :: Finite n -> Finite n -> Finite n Source #

rem :: Finite n -> Finite n -> Finite n Source #

div :: Finite n -> Finite n -> Finite n Source #

mod :: Finite n -> Finite n -> Finite n Source #

quotRem :: Finite n -> Finite n -> (Finite n, Finite n) Source #

divMod :: Finite n -> Finite n -> (Finite n, Finite n) Source #

toInteger :: Finite n -> Integer Source #

KnownNat n => Real (Finite n) 
Instance details

Defined in Data.Finite.Internal

Show (Finite n) 
Instance details

Defined in Data.Finite.Internal

KnownNat n => Additive (Finite n) Source # 
Instance details

Defined in ConCat.Additive

Methods

zero :: Finite n Source #

(^+^) :: Finite n -> Finite n -> Finite n Source #

NFData (Finite n) 
Instance details

Defined in Data.Finite.Internal

Methods

rnf :: Finite n -> () Source #

Eq (Finite n) 
Instance details

Defined in Data.Finite.Internal

Methods

(==) :: Finite n -> Finite n -> Bool Source #

(/=) :: Finite n -> Finite n -> Bool Source #

Ord (Finite n) 
Instance details

Defined in Data.Finite.Internal

Methods

compare :: Finite n -> Finite n -> Ordering Source #

(<) :: Finite n -> Finite n -> Bool Source #

(<=) :: Finite n -> Finite n -> Bool Source #

(>) :: Finite n -> Finite n -> Bool Source #

(>=) :: Finite n -> Finite n -> Bool Source #

max :: Finite n -> Finite n -> Finite n Source #

min :: Finite n -> Finite n -> Finite n Source #

KnownNat n => Foldable ((->) (Finite n)) Source # 
Instance details

Defined in ConCat.Orphans

Methods

fold :: Monoid m => (Finite n -> m) -> m Source #

foldMap :: Monoid m => (a -> m) -> (Finite n -> a) -> m Source #

foldMap' :: Monoid m => (a -> m) -> (Finite n -> a) -> m Source #

foldr :: (a -> b -> b) -> b -> (Finite n -> a) -> b Source #

foldr' :: (a -> b -> b) -> b -> (Finite n -> a) -> b Source #

foldl :: (b -> a -> b) -> b -> (Finite n -> a) -> b Source #

foldl' :: (b -> a -> b) -> b -> (Finite n -> a) -> b Source #

foldr1 :: (a -> a -> a) -> (Finite n -> a) -> a Source #

foldl1 :: (a -> a -> a) -> (Finite n -> a) -> a Source #

toList :: (Finite n -> a) -> [a] Source #

null :: (Finite n -> a) -> Bool Source #

length :: (Finite n -> a) -> Int Source #

elem :: Eq a => a -> (Finite n -> a) -> Bool Source #

maximum :: Ord a => (Finite n -> a) -> a Source #

minimum :: Ord a => (Finite n -> a) -> a Source #

sum :: Num a => (Finite n -> a) -> a Source #

product :: Num a => (Finite n -> a) -> a Source #

type Rep (Finite n) 
Instance details

Defined in Data.Finite.Internal

type Rep (Finite n) = D1 ('MetaData "Finite" "Data.Finite.Internal" "finite-typelits-0.1.6.0-JhiiygZsyRs3chMHxwzVFo" 'True) (C1 ('MetaCons "Finite" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

oops :: String -> b Source #

Pseudo function to fool GHC's divergence checker.