{      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l mnopqrstuvwxyz(C) 2011-2012 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalGADTs Safe-Inferred!" Coend of  from  Hask -> Hask.(C) 2011-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportableUnsafeFormally, the class  represents a profunctor from Hask -> Hask.nIntuitively it is a bifunctor where the first argument is contravariant and the second argument is covariant.You can define a  by either defining  or by defining both  and .If you supply , you should ensure that:  { { "a {If you supply  and  , ensure:  { "a {  { "a { +If you supply both, you should also ensure:  f g "a  f |  gThese ensure by parametricity:  (f | g) (h | i) "a  g h |  f i  (f | g) "a  g |  f  (f | g) "a  f |  g )Map over both arguments at the same time.  f g "a  f |  g'Map the first argument contravariantly.  f "a  f {$Map the second argument covariantly.  "a  {Strictly map the second argument argument covariantly with a function that is assumed operationally to be a cast, such as a newtype constructor.Note: This operation is explicitly unsafe- since an implementation may choose to use }h to implement this combinator and it has no way to validate that your function meets the requirements.'If you implement this combinator with }o, then you are taking upon yourself the obligation that you don't use GADT-like tricks to distinguish values.If you import Data.Profunctor.Unsafe you are taking upon yourself the obligation that you will only call this with a first argument that is operationally identity.\The semantics of this function with respect to bottoms should match the default definition: () "a \f -> \p -> p `seq`  f pStrictly map the first argument argument contravariantly with a function that is assumed operationally to be a cast, such as a newtype constructor.Note: This operation is explicitly unsafe- since an implementation may choose to use }h to implement this combinator and it has no way to validate that your function meets the requirements.'If you implement this combinator with }o, then you are taking upon yourself the obligation that you don't use GADT-like tricks to distinguish values.If you import Data.Profunctor.Unsafe you are taking upon yourself the obligation that you will only call this with a second argument that is operationally identity. () "a \p -> p `seq` \f ->  f p ~~ (C) 2011-2013 Edward Kmett, BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportable TrustworthyHJKM  Analogous to ,  =  unfirst . unfirst = The generalization of  of ! that is strong with respect to .Note: This is also a notion of strength, except with regards to another monoidal structure that we can choose to equip Hask with: the cocartesian coproduct. Generalizing  of a strong Note: Every * in Haskell is strong with respect to (,).RThis describes profunctor strength with respect to the product structure of Hask. 7http://takeichi.ipl-lab.org/~asada/papers/arrStrMnd.pdfWrap an arrow for use as a .Lift a  into a  (backwards).Lift a  into a  (forwards). approximates  costrength%Every Arrow is a Strong Monad in Prof?       /     Safe-InferredHJKM!"#$%&'(!"#$%&'('($%&!"#!"#$%&'( Safe-Inferred68HJKM)*+)*+)*+)*+(C) 2014 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> experimentalportable Trustworthy8Cayley transforms Comonads in Hask into comonads on Prof9Cayley transforms Monads in Hask into monads on Prof,-./0123456789:,-.,-.:9876543210/ ,-./0123456789: Trustworthy !"6HJKM== adjoins a @ structure to any . Analogous to  for .@BA strong profunctor allows the monoidal structure to pass through.@A closed profunctor allows the closed structure to pass through.B B | C "a { C | B "a { C B | C "a { C | B "a { #;<=>?@ABC ;<=>?@ABC @A=>?BC;<;<=>?@ABC(C) 2011-2012 Edward Kmett, BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisional Type-Families Trustworthy 234=HKMDA  p is D if there exists a  f such that p d c is isomorphic to f d -> c.HA  p is H if there exists a  f such that p d c is isomorphic to d -> f c.LJ and K# form two halves of an isomorphism./This can be used with the combinators from the lens package. L :: H p => Iso' (d -> I p c) (p d c)MF and G# form two halves of an isomorphism./This can be used with the combinators from the lens package. M :: E f p => Iso' (f d -> c) (p d c)DEFGHIJKLM DEFGHIJKLM HIJKLDEFGM DEFGHIJKLM (C) 2014 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> experimentalGADTs, TFs, MPTCs, RankN Trustworthy !"6=HJKM N(This represents the right Kan lift of a  q along a  p in a limited version of the 2-category of Profunctors where the only object is the category Hask, 1-morphisms are profunctors composed and compose with Profunctor composition, and 2-morphisms are just natural transformations.QQ p q is the  composition of the s p and q.For a good explanation of 2 composition in Haskell see Dan Piponi's article: :http://blog.sigfpe.com/2011/07/profunctors-in-haskell.htmlT(->)! functions as a lax identity for  composition.This provides an  for the lens1 package that witnesses the isomorphism between Q (->) q d c and q d c", which is the left identity law. T ::  q => Iso' (Q (->) q d c) (q d c) U(->)! functions as a lax identity for  composition.This provides an  for the lens1 package that witnesses the isomorphism between Q q (->) d c and q d c#, which is the right identity law. U ::  q => Iso' (Q q (->) d c) (q d c) VThe associator for  composition.This provides an  for the lens1 package that witnesses the isomorphism between Q p (Q q r) a b and Q (Q p q) r a b, which arises because Prof7 is only a bicategory, rather than a strict 2-category.W composition generalizes  composition in two ways.$This is the first, which shows that exists b. (a -> f b, b -> g c) is isomorphic to  a -> f (g c). W ::  f => Iso' (Q ( f) ( g) d c) ( ( f g) d c)X composition generalizes  composition in two ways.%This is the second, which shows that exists b. (f a -> b, g b -> c) is isomorphic to  g (f a) -> c. X ::  f => Iso' (Q ( f) ( g) d c) ( ( g f) d c)YThis is a variant on W that uses  instead of . Y ::  f => Iso' (Q ( f) ( g) d c) ( ( f g) d c)ZThis is a variant on X that uses  instead of . Z ::  f => Iso' (Q ( f) ( g) d c) ( ( g f) d c)[,The 2-morphism that defines a left Kan lift. Note: When p is right adjoint to N p (->) then [ is the + of the adjunction.N p p forms a  in the . 2-category, which is isomorphic to a Haskell  instance.The composition of two H s is H. by the composition of their representations.NOPQRSTUVWXYZ[NOPQRSTUVWXYZ[QRSTUVWYXZNOP[NOPQRSTUVWXYZ[ (C) 2014 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalRank2Types, TFs Trustworthy=HKM\-This represents the right Kan extension of a  p\ along itself. This provides a generalization of the "difference list" trick to profunctors.\]^_\]^_\]^_\]^_ (C) 2011-2012 Edward Kmett, BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs Trustworthy!"246`The cograph of a .`abc`abc`cba`cba  Safe-InferredHJKMda  that is also a  is a Monoid in Profdededede '(C) 2013-2014 Edward Kmett and Dan Doel BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalRank2Types, TFs Trustworthy=HJKMf-This represents the right Kan extension of a  q along a  p in a limited version of the 2-category of Profunctors where the only object is the category Hask, 1-morphisms are profunctors composed and compose with Profunctor composition, and 2-morphisms are just natural transformations.i2The 2-morphism that defines a right Kan extension. Note: When q is left adjoint to f q (->) then i is the counit of the adjunction.f p p forms a  in the . 2-category, which is isomorphic to a Haskell  instance. fghijklfghijklfghijkl fghijkl(C) 2014 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisional Rank2Types Trustworthy !"6HJKMmCopastro -| CotambaraoMCotambara is freely adjoins respect for cocartesian structure to a profunctorrPastro -| Tambaraw w | x "a { x | w "a { x w | x "a { x | w "a { y y | z "a { z | y "a { z y | z "a { z | y "a { ,mnopqrstuvwxyz     mnopqrstuvwxyztuvwxrsopqyzmn&mnopqrstuvwxyz      !"#$$%&'())*++,-./01234567899:;<=>?@ABCDEFGGHHIJKLMNOPQRSTUVW X X Y Z Z [ \ ] ^ _ ` a b c d d e f g h i j k l m m n o p q rssttuvvwxyz{|}~|}||||| || |}      profunctors-4.3.2Data.Profunctor.TraceData.Profunctor.UnsafeData.ProfunctorData.Profunctor.MonadData.Profunctor.AdjunctionData.Profunctor.CayleyData.Profunctor.ClosedData.Profunctor.RepData.Profunctor.CompositionData.Profunctor.CodensityData.Profunctor.CollageData.Profunctor.MonoidData.Profunctor.RanData.Profunctor.Tambara ProfunctorProfuctor.Unsafe#.TambaraTracedimaplmaprmap.#CochoiceunleftunrightCostrongunfirstunsecondChoiceleft'right'Strongfirst'second'Forget runForget WrappedArrow WrapArrow unwrapArrowDownStar runDownStarUpStar runUpStar:->ProfunctorComonad proextract produplicateProfunctorMonad proreturnprojoinProfunctorFunctorpromapProfunctorAdjunctionunitcounitCayley runCayley$fArrowPlusCayley$fArrowZeroCayley$fArrowLoopCayley$fArrowChoiceCayley $fArrowCayley$fCategory*Cayley$fChoiceCayley$fStrongCayley$fProfunctorCayley$fProfunctorComonadCayley$fProfunctorMonadCayley$fProfunctorFunctorCayley EnvironmentClosure runClosureClosedclosedcloseuncloseCorepresentableCorep cotabulatecorep RepresentableReptabulaterep tabulated cotabulatedRiftrunRift Procompose procomposedidlidrassocupstars downstarskleislis cokleislis decomposeRift Codensity runCodensitydecomposeCodensityCollageCRLetamuRanrunRan decomposeRan precomposeRancurryRan uncurryRanCopastro Cotambara runCotambaraPastro runTambaratambara untambara cotambara uncotambarabaseControl.Categoryid. Unsafe.Coerce unsafeCoerce$fProfunctorCokleisli$fProfunctorKleisli$fProfunctorTagged$fProfunctor(->) Control.Arrow ArrowLooploopGHC.BaseFunctor Data.EitherEither$fChoiceCokleisli comonad-4.2.2Control.Comonadextract$fStrongWrappedArrow$fCostrongKleisli$fCostrongWrappedArrow$fCostrongTagged$fCostrong(->)$fChoiceForget$fChoiceWrappedArrow$fChoiceTagged$fChoiceDownStar$fChoiceUpStar$fChoiceKleisli $fChoice(->)$fStrongForget$fStrongUpStar$fStrongKleisli $fStrong(->)$fTraversableForget$fFoldableForget$fFunctorForget$fProfunctorForget$fProfunctorWrappedArrow$fArrowLoopWrappedArrow$fArrowApplyWrappedArrow$fArrowChoiceWrappedArrow$fArrowZeroWrappedArrow$fArrowWrappedArrow$fCategory*WrappedArrow$fMonadDownStar$fApplicativeDownStar$fFunctorDownStar$fProfunctorDownStar$fMonadPlusUpStar $fMonadUpStar$fAlternativeUpStar$fApplicativeUpStar$fFunctorUpStar$fProfunctorUpStarhitheryon($fProfunctorAdjunctionEnvironmentClosure$fProfunctorMonadEnvironment$fProfunctorFunctorEnvironment$fProfunctorEnvironment$fMonoidClosure$fAlternativeClosure$fApplicativeClosure$fFunctorClosure$fArrowPlusClosure$fArrowZeroClosure$fArrowLoopClosure$fArrowClosure$fCategory*Closure$fStrongClosure$fClosedClosure$fProfunctorComonadClosure$fProfunctorFunctorClosure$fProfunctorClosure$fClosedKleisli$fClosedUpStar$fClosedCokleisli$fClosedDownStar $fClosed(->)$fClosedTaggedIso$fCorepresentableDownStar$fCorepresentableTagged$fCorepresentableCokleisli$fCorepresentable(->)$fRepresentableForget$fRepresentableUpStar$fRepresentableKleisli$fRepresentable(->)transformers-0.3.0.0Data.Functor.ComposeComposeKleisliMonad Cokleisli$fCategory*RiftCategory$fRepresentableProcompose$$fProfunctorAdjunctionProcomposeRift $fFunctorRift$fProfunctorRift$fProfunctorComonadRift$fProfunctorFunctorRift$fClosedProcompose$fChoiceProcompose$fStrongProcompose$fCorepresentableProcompose$fFunctorProcompose$fProfunctorProcompose$fProfunctorMonadProcompose$fProfunctorFunctorProcompose$fCategory*Codensity$fFunctorCodensity$fProfunctorCodensity $fObCollageR $fObCollageL$fSemigroupoidCollage$fCategory*Ran $fFunctorRan$fProfunctorRan$fProfunctorComonadRan$fProfunctorFunctorRan$fProfunctorMonadCopastro$fProfunctorFunctorCopastro'$fProfunctorAdjunctionCopastroCotambara$fProfunctorCopastro$fFunctorCotambara$fCategory*Cotambara$fChoiceCotambara$fProfunctorCotambara$fProfunctorComonadCotambara$fProfunctorFunctorCotambara#$fProfunctorAdjunctionPastroTambara$fProfunctorMonadPastro$fProfunctorFunctorPastro$fProfunctorPastro$fMonoidTambara$fAlternativeTambara$fApplicativeTambara$fFunctorTambara$fArrowPlusTambara$fArrowZeroTambara$fArrowLoopTambara$fArrowApplyTambara$fArrowChoiceTambara$fArrowTambara$fCategory*Tambara$fChoiceTambara$fStrongTambara$fProfunctorComonadTambara$fProfunctorFunctorTambara$fProfunctorTambara