/      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe%&DORTAn instance of  Category k declares the arrow k as a category.\Whenever objects are required at value level, they are represented by their identity arrows.Op k& is opposite category of the category k. KThe category with Haskell types as objects and Haskell functions as arrows.   8 BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe%&:DQR !The product category of category c1 and c2.      BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe %&9:;DOQRT#<The constant functor with the same domain and codomain as f.*dWe need a wrapper here because objects need to be of kind *, and categories are of kind * -> * -> *.+(Functors are arrows in the category Cat.- Functors map objects and arrows../The domain, or source category, of the functor./1The codomain, or target category, of the functor.0:% maps objects.1% maps arrows.225 swaps the 2 categories of the product of categories.3) tuples with a fixed object on the right.4The covariant functor Hom(X,--)5#The contravariant functor Hom(--,X)6rThe Hom functor, Hom(--,--), a bifunctor contravariant in its first argument and covariant in its second argument.7( tuples with a fixed object on the left.8& is the diagonal functor for products.9 f1 :***: f2 is the product of the functors f1 and f2.:D is a bifunctor that projects out the second component of a product.;C is a bifunctor that projects out the first component of a product.<The  x = Op (Op x) functor.=The  Op (Op x) = x functor.>The dual of a functor?The constant functor.@ The composition of two functors.AThe identity functor on kBCatB is the category with categories as objects and funtors as arrows.6  !"#$%&'()*+,-./0123456789:;<=>?@AB)  !"#$%&'()*+,-.0/12345)+,*-./01()&'$%#!" 234 5%  !"#$%&'()*+,-./0123456789:;<=>?@AB09 19  BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe%&9:;DNOQRTIPostcompose f c is the functor such that Postcompose f c :% g = f :.: g, for functors g that compose with f and with domain c.JPrecompose f e is the functor such that Precompose f e :% g = g :.: f, for functors g that compose with f and with codomain e.L)Composition of endofunctors is a functor.MThe category of endofunctors.PfA newtype wrapper for components, which can be useful for helper functions dealing with components.SA component for an object z is an arrow from F z to G z.TINatural transformations are built up of components, one for each object z in the domain category of f and g.Vf :~> g9 is a natural transformation from functor f to functor g.W-'n ! a' returns the component for the object a of a natural transformation nL. This can be generalized to any arrow (instead of just identity arrows).X2Horizontal composition of natural transformations.Y1The identity natural transformation of a functor.hC converts an object a to the functor  a.iE is a bifunctor, Apply :% (f, a) applies f to a, i.e. f :% a.jWrap f h is the functor such that Wrap f h :% g = f :.: g :.: h, for functors g that compose with f and h.k%Composition of functors is a functor.lkFunctor category D^C. Objects of D^C are functors from C to D. Arrows of D^C are natural transformations.*CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl%CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg%VSPQRWXYZ[TUMK\]^_`abcdeNOLJfIgGHEFCD#CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklW9  BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe%&om! is the category with one object.mnomnmnomno BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe %&DQR[au!Since there is nothing to map in r2, there's a functor from it to any other category.vr! is the category with no objects.pqrstuvpqrstrsvtpqupqrstuv BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe%&:DQR A natural transformation Nat c d! is isomorphic to a functor from c :**: 2 to d..The directed coproduct category of categories c1 and c2.}b projects out to the right category, replacing a value from the left category with a fixed object.b projects out to the left category, replacing a value from the right category with a fixed object.* is the codiagonal functor for coproducts. f1 :+++: f2" is the coproduct of the functors f1 and f2.4 is a functor which injects into the right category.3 is a functor which injects into the left category.%The coproduct category of categories c1 and c2. wxyz{|}~wxyz{|}~ }~yz{|wxwxyz{|}~ BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafeDOQRT@An initial universal property, a universal morphism from x to u.@A terminal universal property, a universal morphism from u to x.   BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe %&:DOQRTBThe category with categories as objects and adjunctions as arrows.  BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe%&9:;<=DOQRT9An instance of HasColimits j k says that k has all colimits of type j., returns the limiting co-cone for a functor f.J shows that the limiting co-cone is universal  i.e. any other co-cone of fS factors through it by returning the morphism between the vertices of the cones.Colimits in a category k by means of a diagram of type j, which is a functor from j to k.An instance of  HasLimits j k says that k has all limits of type j.) returns the limiting cone for a functor f.D shows that the limiting cone is universal  i.e. any other cone of fS factors through it by returning the morphism between the vertices of the cones.Limits in a category k by means of a diagram of type j, which is a functor from j to k.VA co-cone from F to N is a natural transformation from F to the constant functor to N.SA cone from N to F is a natural transformation from the constant functor to N to F.:The diagonal functor with the same domain and codomain as f.The vertex (or apex) of a cone."The vertex (or apex) of a co-cone.;The limit functor is right adjoint to the diagonal functor.<The colimit functor is left adjoint to the diagonal functor.5A specialisation of the limit adjunction to products.9A specialisation of the colimit adjunction to coproducts.XThe colimit of any diagram with a terminal object, has the limit at the terminal object..The colimit of a single object is that object.UThe limit of any diagram with an initial object, has the limit at the initial object.,The limit of a single object is that object.2Binary products are the dual of binary coproducts.2Binary products are the dual of binary coproducts.1Terminal objects are the dual of initial objects.1Terminal objects are the dual of initial objects.The functor coproduct / is the binary coproduct in functor categories.pThe coproduct of two functors, passing the same object to both functors and taking the coproduct of the results. Binary coproduct as a bifunctor.^The binary coproduct of the product of 2 categories is the product of their binary coproducts.?In the category of one object that object is its own coproduct.The coproduct of categories  is the binary coproduct in +.If kE has binary coproducts, we can take the colimit of 2 joined diagrams.The functor product - is the binary product in functor categories.lThe product of two functors, passing the same object to both functors and taking the product of the results.Binary product as a bifunctor.ZThe binary product of the product of 2 categories is the product of their binary products.=In the category of one object that object is its own product.The product of categories   is the binary product in +.#The tuple is the binary product in Hask.If kA has binary products, we can take the limit of 2 joined diagrams.gThe initial object of the direct coproduct of categories is the initial object of the initial category. =The category of one object has that object as initial object. ZThe initial object of the product of 2 categories is the product of their initial objects. `The constant functor to the initial object is itself the initial object in its functor category. ,The empty category is the initial object in Cat. ,Any empty data type is an initial object in Hask.5An initial object is the colimit of the functor from 0 to k.jThe terminal object of the direct coproduct of categories is the terminal object of the terminal category.\The terminal object of the product of 2 categories is the product of their terminal objects.>The category of one object has that object as terminal object.bThe constant functor to the terminal object is itself the terminal object in its functor category.Unit is the terminal category.() is the terminal object in Hask.3A terminal object is the limit of the functor from 0 to k.If every diagram of type j has a colimit in kJ there exists a colimit functor. It can be seen as a generalisation of (+++).If every diagram of type j has a limit in kH there exists a limit functor. It can be seen as a generalisation of (***).3The diagonal functor from (index-) category J to k.`     66E     2233  BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe $%&9;DOQRT 8A comonad is a comonoid in the category of endofunctors.4A monad is a monoid in the category of endofunctors.ComonoidObject f a defines a comonoid a. in a comonoidal category with tensor product f.!MonoidObject f a defines a monoid a, in a monoidal category with tensor product f.%{A monoidal category is a category with some kind of tensor product. A tensor product is a bifunctor, with a unit object.53Every adjunction gives rise to an associated monad.65Every adjunction gives rise to an associated comonad.7'A monoid as a category with one object.8cFunctor composition makes the category of endofunctors monoidal, with the identity functor as unit.9~If a category has all coproducts, then the coproduct functor makes it a monoidal category, with the initial object as unit.:{If a category has all products, then the product functor makes it a monoidal category, with the terminal object as unit." !"#$%&'()*+,-./0123456789: !"#$%&'()*+,-./0123456"%&'()*+,-:98!"#$./ 01723456 !"#$%&'()*+,-./0123456789:  BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafeDOQRT>The Yoneda embedding functor, C -> Set^(C^op).?? and @3 are together the isomophism from the Yoneda lemma.A; converts a functor f9 into a natural transformation from the hom functor to f.;<=>?@A;<=>?@=>;<A?@;<=>?@A  BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe %&9;DOQRTCCFrom every adjunction we get a monad, in this case the State monad.GWA category is cartesian closed if it has all products and exponentials for all objects.M@The product functor is left adjoint the the exponential functor.NFrom the adjunction between the product functor and the exponential functor we get the curry and uncurry functions, generalized to any cartesian closed category.T)The category of presheaves on a category C is cartesian closed for any C.UExponentials in Cat are the functor categories.VExponentials in Hask are functions.WThe exponential as a bifunctor.BCDEFGHIJKLMNOPQRSTUVWBCDEFGHIJKLMNOPQRSGHIJKEFWVUDLTMNOCPQBRSBCDEFGHIJKLMNOPQRSTUVW BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe %&DQRTd8Implication makes the Boolean category cartesian closed.e<Disjunction is the binary coproduct in the Boolean category.f:Conjunction is the binary product in the Boolean category.g4True is the terminal object in the Boolean category.h4False is the initial object in the Boolean category.iBooleanQ is the category with true and false as objects, and an arrow from false to true.XYZ[\]^_`abcdefghi XY[Z\]^_`abc]\XYZ[ihgfed^_`abcXYZ[\]^_`abcdefghi BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafeDQRj Take the jX category, add a new disctinct object, and an arrow from that object to every object in j, and you get j again.oThe k functor wraps m around  f (Fix f).pFix f inherits its exponentials from  f (Fix f).qFix f inherits its (co)limits from  f (Fix f).rFix f inherits its (co)limits from  f (Fix f).sFix f inherits its (co)limits from  f (Fix f).tFix f inherits its (co)limits from  f (Fix f).um f7 is the fixed point category for a category combinator f. jklmnopqrstujklmn mnutsrqpkloj jklmnopqrstu BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe%&9:;DOQRTThe category of Kleisli arrows. vwxyz{|}~vwxyz{|} z{|xyvw~}vwxyz{|}~ BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe$%&9:;DQRT QA anamorphism of an F-coalgebra is the arrow from it to the terminal F-coalgebra.MA catamorphism of an F-algebra is the arrow to it from the initial F-algebra.PThe terminal F-coalgebra is the terminal object in the category of F-coalgebras.JThe initial F-algebra is the initial object in the category of F-algebras.-Arrows of Dialg(F,G) are (F,G)-homomorphisms.+Objects of Dialg(F,G) are (F,G)-dialgebras. ForgetAlg m is the forgetful functor for Alg m.FreeAlg M takes x to the free algebra  (M x, mu_x) of the monad M.[The category for defining the natural numbers and primitive recursion can be described as  Dialg(F,G), with  F(A)=<1,A> and  G(A)=<A,A>.!The category of (F,G)-dialgebras. BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe%&DQR  BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe %&DOQRT The maps 0 -> 1 and 2 -> 1) form a monoid, which is universal, c.f. .%Replicate a monoid a number of times.FOrdinal addition makes the simplex category a monoidal category, with 0 as unit.EOrdinal addition is a bifuntor, it concattenates the maps as it were.Turn  Simplex x y arrows into Fin x -> Fin y functions. The ordinal 10 is the terminal object of the simplex category. The ordinal 0/ is the initial object of the simplex category.^The (augmented) simplex category is the category of finite ordinals and order preserving maps. BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe %&DOQRTEOrdinal addition is a bifuntor, it concattenates the maps as it were.Turn Cube x y arrows into ACube x -> ACube y functions.  BSD-style (see the file LICENSE)sjoerd@w3future.com experimental non-portableSafe%&9:;<=DQRT!The comma category T \downarrow S     !"##$%&&''(())**++,,--.//001123456789:;<=>?@ABCDEFGHIJKKLLMMNOPQRSSTTUVWWXYZ[\]^_`abcdefghijklmnoopqqrstuvwwxyz{||}}~~                                                      o                   ! " # # $ % & ' ( ) * + , , - . / 0 1 2 3 4 5 6 7 8 9 : ; < =>?@AA?BCDEFGHIJKLMNMMOOlPQRSTUVVWWXXYZ[\]^^__`abcdefghijklmmnopqrstuvvW`abwxyzp{|}~~abaabba)data-category-0.6.2-Aop7RB7wAzN7kSs7Js3wn Data.CategoryData.Category.ProductData.Category.Functor#Data.Category.NaturalTransformationData.Category.UnitData.Category.VoidData.Category.Coproduct"Data.Category.RepresentableFunctorData.Category.AdjunctionData.Category.LimitData.Category.MonoidalData.Category.YonedaData.Category.CartesianClosedData.Category.BooleanData.Category.FixData.Category.KleisliData.Category.DialgData.Category.NNOData.Category.SimplexData.Category.CubeData.Category.CommaOpunOpCategorysrctgt.Obj $fCategoryOp$fCategory(->):**:$fCategory:**::-*::*-:HomTuple2SwapTuple1DiagProd:***:Proj2Proj1OpOpInvOpOpOppositeConstFConst:.:IdCatWCatCatAFunctorDomCod:%%swaptuple2homX_hom_X $fFunctorHom$fFunctorTuple1$fFunctorDiagProd$fFunctor:***:$fFunctorProj2$fFunctorProj1$fFunctorOpOpInv $fFunctorOpOp$fFunctorOpposite$fFunctorConst $fFunctor:.: $fFunctorId $fCategoryCatTupleApplyWrap Postcompose Precompose PresheavesEndoFunctorComposeEndoFunctorComposeComunCom ComponentNat:~>!onatIdsrcFtgtF compAssoc compAssocInv idPrecomp idPrecompInv idPostcomp idPostcompInv constPrecompconstPrecompInv constPostcompconstPostcompInv precompose postcompose$fFunctorTuple$fFunctorApply $fFunctorWrap$fFunctorFunctorCompose $fCategoryNatUnit$fCategoryUnitMagicVoidmagicvoidNat$fFunctorMagic$fCategoryVoid NatAsFunctor:>>:I1AI12I2ACotuple2Cotuple1 CodiagCoprod:+++:Inj2Inj1:++:I1I2$fFunctorNatAsFunctor$fCategory:>>:$fFunctorCotuple2$fFunctorCotuple1$fFunctorCodiagCoprod$fFunctor:+++: $fFunctorInj2 $fFunctorInj1$fCategory:++:TerminalUniversalInitialUniversal RepresentablerepresentedFunctorrepresentingObject representuniversalElement unrepresentcovariantHomReprcontravariantHomReprinitialUniversalterminalUniversalAdjArrow Adjunction leftAdjoint rightAdjointunitcounit mkAdjunction leftAdjunct rightAdjunctadjunctionInitialPropadjunctionTerminalPropinitialPropAdjunctionterminalPropAdjunctionidAdj composeAdj precomposeAdjpostcomposeAdjcontAdj$fCategoryAdjArrow:+:CoproductFunctorHasBinaryCoproductsBinaryCoproductinj1inj2|||+++:*:ProductFunctorHasBinaryProducts BinaryProductproj1proj2&&&***ZeroHasInitialObject InitialObject initialObject initializeHasTerminalObjectTerminalObjectterminalObject terminateColimitFunctor HasColimitscolimitcolimitFactorizerColimit ColimitFam LimitFunctor HasLimitslimitlimitFactorizerLimitLimitFamCoconeConeDiagFDiag coneVertex coconeVertexlimitAdj colimitAdjprodAdj coprodAdj$fHasColimits:>>:k$fHasColimitsUnitk$fHasLimits:>>:k$fHasLimitsUnitk$fHasBinaryCoproductsOp$fHasBinaryProductsOp$fHasInitialObjectOp$fHasTerminalObjectOp$fHasBinaryCoproductsNat $fFunctor:+:$fFunctorCoproductFunctor$fHasBinaryCoproducts:>>:$fHasBinaryCoproducts:**:$fHasBinaryCoproductsUnit$fHasBinaryCoproductsCat$fHasColimits:++:k$fHasBinaryProductsNat $fFunctor:*:$fFunctorProductFunctor$fHasBinaryProducts:>>:$fHasBinaryProducts:**:$fHasBinaryProductsUnit$fHasBinaryProductsCat$fHasBinaryProducts(->)$fHasLimits:++:k$fHasInitialObject:>>:$fHasInitialObjectUnit$fHasInitialObject:**:$fHasInitialObjectNat$fHasInitialObjectCat$fHasInitialObject(->)$fHasColimitsVoidk$fHasTerminalObject:>>:$fHasTerminalObject:**:$fHasTerminalObjectUnit$fHasTerminalObjectNat$fHasTerminalObjectCat$fHasTerminalObject(->)$fHasLimitsVoidk$fFunctorColimitFunctor$fFunctorLimitFunctor $fFunctorDiagComonadMonadMonoidAsCategory MonoidValueComonoidObject comultiply MonoidObjectmultiply TensorProduct unitObject leftUnitor leftUnitorInv rightUnitorrightUnitorInv associator associatorInv trivialMonoidcoproductMonoidtrivialComonoidproductComonoidmkMonad monadFunctor mkComonadadjunctionMonadadjunctionComonad$fCategoryMonoidAsCategory$fTensorProductFunctorCompose$fTensorProductCoproductFunctor$fTensorProductProductFunctorYonedaYonedaEmbeddingyonedaEmbedding fromYonedatoYoneda$fFunctorYonedaContextStatePShExponential ExpFunctorCartesianClosed Exponentialapplytuple^^^pshExponentialcurryAdjcurryuncurrystateMonadReturnstateMonadJoincontextComonadExtractcontextComonadDuplicate$fCartesianClosedNat$fCartesianClosedCat$fCartesianClosed(->)$fFunctorExpFunctorBooleanFlsF2TTrutrueProductMonoidfalseCoproductComonoidtrueProductComonoidfalseCoproductMonoidtrueCoproductMonoidfalseProductComonoid$fCartesianClosedBoolean$fHasBinaryCoproductsBoolean$fHasBinaryProductsBoolean$fHasTerminalObjectBoolean$fHasInitialObjectBoolean$fCategoryBooleanOmegaFix$fCartesianClosedFix$fHasBinaryCoproductsFix$fHasBinaryProductsFix$fHasTerminalObjectFix$fHasInitialObjectFix $fCategoryFix KleisliAdjG KleisliAdjFKleisli kleisliId kleisliAdj$fFunctorKleisliAdjG$fFunctorKleisliAdjF$fCategoryKleisli ForgetAlgFreeAlgNatNumZSAnaCataTerminalFAlgebraInitialFAlgebra CoalgebraCoalgAlgebraAlgDialgDialgA DialgebradialgId dialgebraprimReceilenbergMooreAdj$fFunctorForgetAlg$fFunctorFreeAlg$fHasInitialObjectDialg$fCategoryDialgPrimRecHasNaturalNumberObjectNaturalNumberObjectzerosucc$fFunctorPrimRec$fHasNaturalNumberObjectCat$fHasNaturalNumberObject(->) ReplicateAddForgetFinFzFsSimplexYXsucuniversalMonoid$fFunctorReplicate$fTensorProductAdd $fFunctorAdd$fFunctorForget$fHasTerminalObjectSimplex$fHasInitialObjectSimplex$fCategorySimplexACubeNilConsSign0SMS0SPCubeSignMP$fHasTerminalObjectCube$fCategoryCube ObjectsOver ObjectsUnder ObjectsFOver ObjectsFUnder:/\:CommaACommaOcommaIdinitialUniversalCommaterminalUniversalComma$fCategory:/\: