!lY      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ # Safe&',-.1245678=>?@AHSUVX_fk;barbiesLike  but for binary relations.barbies' has one universal instance that makes  c f a equivalent to c (f a). However, we have 'ClassF c f :: k ->    GThis is useful since it allows to define constraint-constructors like   barbies c a. is evidence that there exists an instance of c a. It is essentially equivalent to  Dict (c a) from the  .http://hackage.haskell.org/package/constraints constraintsI package, but because of its kind, it allows us to define things like  .barbiesjTurn a constrained-function into an unconstrained one that uses the packed instance dictionary instead. Safe',.1245678=>?@AHSUVX_fkFSafe&',-.1245678=>?@AHSUVX_fk6barbies '[f, g, h] a -> r4 is the type of the uncurried form of a function f a -> g a -> h a -> r. , moves from the former to the later. E.g.  ( '[] a -> r) = r a  ( '[f] a -> r) = f a -> r a  (% '[f, g] a -> r) = f a -> g a -> r a barbies,Type-level, poly-kinded, list-concatenation.barbiesProduct of n functors. barbiesThe unit of the product. barbiesLift a functor to a 1-tuple. barbiesConversion from a standard  barbiesConversion to a standard barbiesFlat product of products.barbiesLike  but using A instead of pairs. Can be thought of as a family of functions:  :: r a ->  '[] a  :: (f a -> r a) ->  '[f] a  :: (f a -> g a -> r a) ->  '[f, g] a " :: (f a -> g a -> h a -> r a) ->  '[f, g, h] a " barbiesInductively defined instance:  ( (f ': fs)).barbiesInductively defined instance:  ( '[]).barbiesInductively defined instance:  ( (f ': fs)).barbiesInductively defined instance:  ( '[]).barbiesInductively defined instance:  ( (f ': fs)).barbiesInductively defined instance:  ( '[]).barbiesInductively defined instance:  ( (f ': fs)).barbiesInductively defined instance:  ( '[]).barbiesInductively defined instance:  ( (f ': fs)).barbiesInductively defined instance:  ( '[]).barbiesInductively defined instance:  ( (f ': fs)).barbiesInductively defined instance:  ( '[]).barbiesInductively defined instance:  ( (f ': fs)).barbiesInductively defined instance:  ( '[]).barbiesInductively defined instance:  ( (f ': fs)).barbiesInductively defined instance:  ( '[]). barbiesInductively defined instance:  ( (f ': fs)).!barbiesInductively defined instance:  ( '[])."barbiesInductively defined instance:  ( (f ': fs)).#barbiesInductively defined instance:  ( '[]).$barbiesInductively defined instance:  ( (f ': fs)).%barbiesInductively defined instance:  ( '[]).    (C) 2018 Csongor KissBSD3 experimental non-portableNone',-./1245678=>?@AHSUVX_fk9%r      !"#$%&'()*+,-./0123456789:;<&'()*+,-./01234None',.1245678=>?@AHSUVX_fkB5barbiesThe 54 type-function allows one to define a Barbie-type as data B t f = B { f1 :: 5 t f = , f2 :: 5 t f > } .This gives rise to two rather different types:B 6 f1 is a normal Barbie-type, in the sense that f1 :: B 6 f -> f =, etc.B 7 fM, on the other hand, is a normal record with no functor around the type: B { f1 :: 5, f2 = ? } :: B 7 f 567None',-.1245678=>?@AHSUVX_fkC89None',-.1245678=>?@AHSUVX_fkD0:;None',-.1245678=>?@AHSUVX_fkP<barbies< T f g x" is in practice a predicate about TK only. Intuitively, it says that the following holds, for any arbitrary f:There is an instance of  (T f).T f x can contain fields of type t f y" as long as there exists a = t. instance. In particular, recursive usages of T f y are allowed.T f x can also contain usages of t f y under a  h$. For example, one could use  (T f y) when defining T f y.=barbies:Functor from indexed-types to indexed-types. Instances of =& should satisfy the following laws: > @ = @ > f . > g = > (f . g) There is a default > implementation for 0 types, so instances can derived automatically.AbarbiesDefault implementation of > based on .<=>ANone',-.1245678=>?@AHSUVX_fkd?barbies? T f g x" is in practice a predicate about T only. It is analogous to I, so it essentially requires the following to hold, for any arbitrary f:There is an instance of  (T f x).T f x can contain fields of type t f x" as long as there exists a @ t. instance. In particular, recursive usages of T f x are allowed.T f x can also contain usages of t f x under a  h$. For example, one could use  (T f x) when defining T f x.@barbiesjIndexed-functors that can be traversed from left to right. Instances should satisfy the following laws:  t . A f = A (t . f) -- naturality A  =  -- identity A (B . C g . f) = B . C (A g) . A f -- composition There is a default A implementation for 0 types, so instances can derived automatically.BbarbiesdMap each element to an action, evaluate these actions from left to right, and ignore the results.CbarbiesUEvaluate each action in the structure from left to right, and collect the results.Dbarbies A version of C with f specialized to D.Ebarbies6Map each element to a monoid, and combine the results.EbarbiesDefault implementation of A based on .?@ABCDEENone',-.1245678=>?@AHSUVX_fkxFbarbiesiSome endo-functors on indexed-types are monads. Common examples would be "functor-transformers", like B or F. In that sense, F is similar to , but with additional structure (see also  *https://hackage.haskell.org.package/mmorphmmorph's MMonad class).Notice though that while  assumes a G% instance of the value to be lifted, G has no such constraint. This means we cannot have instances for most "monad transformers", since lifting typically involves an C.F- also corresponds to the indexed-monad of  ;https://personal.cis.strath.ac.uk/conor.mcbride/Kleisli.pdf$Kleisli arrows of outrageous fortune.eInstances of this class should to satisfy the monad laws. They laws can stated either in terms of (G, H) or (G, I). In the former: > h . G = G . h > h . H = H . > (> h) H . G = @ H . 'tmap tlift' = @ H . H = H . > H In the latter: I f . G = f I G = @ I f . I g = I (I f . g) Gbarbies(Lift a functor to a transformed functor.HbarbiesThe conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.Ibarbies Analogous to ().FGHINone',-.1245678=>?@AHSUVX_fkJbarbiesJ B f g" is in practice a predicate about BK only. Intuitively, it says that the following holds, for any arbitrary f:There is an instance of  (B f).B f can contain fields of type b f" as long as there exists a K b. instance. In particular, recursive usages of B f are allowed.B f can also contain usages of b f under a  h$. For example, one could use  (B f) when defining B f.Kbarbies3Barbie-types that can be mapped over. Instances of K& should satisfy the following laws: L @ = @ L f . L g = L (f . g) There is a default L implementation for 0 types, so instances can derived automatically.MbarbiesDefault implementation of L based on .JKLMNone',-.1245678=>?@AHSUVX_fkNbarbiesN B f g" is in practice a predicate about B only. It is analogous to I, so it essentially requires the following to hold, for any arbitrary f:There is an instance of  (B f).B f can contain fields of type b f" as long as there exists a O b. instance. In particular, recursive usages of B f are allowed.B f can also contain usages of b f under a  h$. For example, one could use  (B f) when defining B f.ObarbiesfBarbie-types that can be traversed from left to right. Instances should satisfy the following laws:  t . P f = P (t . f) -- naturality P  =  -- identity P (B . C g . f) = B . C (P g) . P f -- composition There is a default P implementation for 0 types, so instances can derived automatically.QbarbiesdMap each element to an action, evaluate these actions from left to right, and ignore the results.RbarbiesUEvaluate each action in the structure from left to right, and collect the results.Sbarbies A version of R with f specialized to D.Tbarbies6Map each element to a monoid, and combine the results.UbarbiesDefault implementation of P based on .NOPQRSTU None',-.1245678=>?@AHSUVX_fkWbarbies0We use the type-families to generically compute ! c b. Intuitively, if b' f occurs inside b f, then we should just add ! b' c to ! b c. The problem is that if b is a recursive type, and b' is bN, then ghc will choke and blow the stack (instead of computing a fixpoint).-So, we would like to behave differently when b = b' and add () instead of ! b fN to break the recursion. Our trick will be to use a type family to inspect + (b f) and distinguish recursive usages from non-recursive ones, tagging them with different types, so we can distinguish them in the instances. VWXYZ[\]^"None',-.1245678=>?@AHSUVX_fk_`a#None',-.1245678=>?@AHSUVX_fkBbbarbiesAll types that admit a generic K0 instance, and have all their occurrences of f under a 5 admit a generic c instance.cbarbies$Class of Barbie-types defined using 5 and can therefore have 7 versions. Must satisfy: e . d = @ d . e = @ fbarbiesGeneralization of d to arbitrary functorsgbarbiesGeneralization of e to arbitrary functorshbarbiesDefault implementation of d based on .ibarbiesDefault implementation of d based on . 567bcdefghiNone',.1245678=>?@AHSUVX_fke567cdefg576cdefg$None',.1245678=>?@AHSUVX_fk567cdefg576cdefg%None',-.1245678=>?@AHSUVX_fkjkl&None',-.1245678=>?@AHSUVX_fkqmbarbiesm T f g x" is in practice a predicate about TK only. Intuitively, it says that the following holds, for any arbitrary f:There is an instance of  (T f).T: has only one constructor (that is, it is not a sum-type).Every field of T f x$ is either a monoid, or of the form f a, for some type a.nbarbiesA =+ with application, providing operations to:embed an "empty" value (o)align and combine values (p)%It should satisfy the following laws: Naturality of p > ((H a b) -> H (f a) (g b)) (u `tprod' v) = > f u `tprod' > g v  Left and right identity > ((H _ b) -> b) (o e `tprod' v) = v > ((H a _) -> a) (u `tprod' o e) = u   Associativity > ((H a (H b c)) -> H (H a b) c) (u `tprod' (v `tprod' w)) = (u `tprod' v) `tprod' w  It is to = in the same way is  relates to . For a presentation of - as a monoidal functor, see Section 7 of  7http://www.soi.city.ac.uk/~ross/papers/Applicative.html$Applicative Programming with Effects.%There is a default implementation of p and o based on 5. Intuitively, it works on types where the value of o is uniquely defined. This corresponds rougly to record types (in the presence of sums, there would be several candidates for o!), where every field is either a  or covered by the argument f.qbarbies An alias of p.rbarbiesAn equivalent of I.sbarbiesAn equivalent of '(.tbarbiesAn equivalent of ').ubarbiesAn equivalent of '*.JbarbiesDefault implementation of p based on . mnopqrstuJK+None',-.1245678=>?@AHSUVX_fkvbarbies;The representation used for the generic computation of the z c t constraints. Here [ and Z9 are arbitrary constants since the actual argument to t is irrelevant.wbarbiesw T f g x" is in practice a predicate about TK only. Intuitively, it says that the following holds, for any arbitrary f and x:There is an instance of  (T f x).T f can contain fields of type t f x" as long as there exists a y t. instance. In particular, recursive usages of T f x are allowed.xbarbies Similar to z# but will put the functor argument f between the constraint c and the type a.ybarbies`Instances of this class provide means to talk about constraints, both at compile-time, using z%, and at run-time, in the form of , via {.)A manual definition would look like this: data T f a = A (f =) (f L ) | B (f >) (f = ) instance y T where type z c T = (c =, c L, c >) { t = case t of A x y -> A (H  x) (H  y) B z w -> B (H  z) (H  w) Now, when we given a T f, if we need to use the ' instance of their fields, we can use: { :: AllT Show t => t f -> t (  `Product' f) %There is a default implementation of y for * types, so in practice one will simply do: derive instance  (T f a) instance y T zbarbiesz c t should contain a constraint c a for each a occurring under an f in t f.&For requiring constraints of the form c (f a), use x.|barbiesLike >B but a constraint is allowed to be required on each element of t.}barbiesLike A* but with a constraint on the elements of t.MbarbiesLike ,' but with a constraint on the function.NbarbiesLike -* but with a constraint on the elements of t.ObarbiesLike .* but with a constraint on the elements of t.PbarbiesLike /* but with a constraint on the elements of t.Qbarbies Similar to {@ but can produce the instance dictionaries "out of the blue".RbarbiesLike oB but a constraint is allowed to be required on each element of t.Sbarbies Builds a t f x, by applying T on every field of t.Ubarbies/Default implementation of ibaddDicts' based on .vwxyz{|}MNOPQRSUNone',.1245678=>?@AHSUVX_fk/01=>@ABCDEFGHInopqrstuxyz{|}=>@ABECDnopqrstuFGHIyz{x|}/010None',-.1245678=>?@AHSUVX_fk~barbies~ B f g" is in practice a predicate about BK only. Intuitively, it says that the following holds, for any arbitrary f:There is an instance of  (B f).B: has only one constructor (that is, it is not a sum-type).Every field of B f$ is either a monoid, or of the form f a, for some type a.barbiesA K+ with application, providing operations to:embed an "empty" value ()align and combine values ()%It should satisfy the following laws: Naturality of  L ((H a b) -> H (f a) (g b)) (u `bprod' v) = L f u `bprod' L g v  Left and right identity L ((H _ b) -> b) ( e `bprod' v) = v L ((H a _) -> a) (u `bprod'  e) = u   Associativity L ((H a (H b c)) -> H (H a b) c) (u `bprod' (v `bprod' w)) = (u `bprod' v) `bprod' w  It is to K in the same way as  relates to . For a presentation of - as a monoidal functor, see Section 7 of  7http://www.soi.city.ac.uk/~ross/papers/Applicative.html$Applicative Programming with Effects.%There is a default implementation of  and  based on 5. Intuitively, it works on types where the value of  is uniquely defined. This corresponds rougly to record types (in the presence of sums, there would be several candidates for !), where every field is either a  or covered by the argument f.barbies An alias of , since this is like a V.barbiesAn equivalent of I.barbiesAn equivalent of '(.barbiesAn equivalent of ').barbiesAn equivalent of '*.barbiesDefault implementation of  based on . ~1None',-.1245678=>?@AHSUVX_fk0barbies;The representation used for the generic computation of the  c b constraints. Here [: is an arbitrary constant since the actual argument to b is irrelevant.barbies B f g" is in practice a predicate about BK only. Intuitively, it says that the following holds, for any arbitrary f:There is an instance of  (B f).B f can contain fields of type b f" as long as there exists a  b. instance. In particular, recursive usages of B f are allowed.barbies Similar to # but will put the functor argument f between the constraint c and the type a. For example:    Person ~ ( L,  =)   f Person ~ ( (f L),  (f =)) barbies`Instances of this class provide means to talk about constraints, both at compile-time, using %, and at run-time, in the form of , via .)A manual definition would look like this: data T f = A (f =) (f L ) | B (f >) (f = ) instance  T where type  c T = (c =, c L, c >)  t = case t of A x y -> A (H  x) (H  y) B z w -> B (H  z) (H  w) Now, when we given a T f, if we need to use the ' instance of their fields, we can use:  :: AllB Show b => b f -> b (  `Product' f) %There is a default implementation of  for * types, so in practice one will simply do: derive instance  (T f) instance  T barbies c b should contain a constraint c a for each a occurring under an f in b f. E.g.:   Person ~ ( L,  =) &For requiring constraints of the form c (f a), use .barbiesLike LB but a constraint is allowed to be required on each element of bE.g. If all fields of b are ?able then you could store each shown value in it's slot using W: showFields :: (AllB Show b, ConstraintsB b) => b Identity -> b (Const String) showFields = bmapC @Show showField where showField :: forall a. Show a => Identity a -> Const String a showField (Identity a) = Const (show a)barbiesLike P* but with a constraint on the elements of b.barbiesLike 2* but with a constraint on the elements of b.barbiesLike 3* but with a constraint on the elements of b.barbiesLike 4* but with a constraint on the elements of b.barbies Similar to @ but can produce the instance dictionaries "out of the blue".barbiesLike B but a constraint is allowed to be required on each element of b.barbies Builds a b f, by applying T on every field of b.barbiesDefault implementation of  based on .None',.1245678=>?@AHSUVX_fk1 /01KLOPQRST KLOPQTRS/015None',.1245678=>?@AHSUVX_fk6Rbarbies.Wrapper for barbies that act as containers of e by wearing X e.barbies.Wrapper for barbies that act as containers of a by wearing (W a).6None',-.1245678=>?@AHMSUVX_fk8barbies7A wrapper for Barbie-types, providing useful instances.7None',-.1245678=>?@AHSUVX_fk:barbies A barbie type without structure.barbiesUninhabited barbie type.8None',-.1245678=>?@AHSUVX_fk<YbarbiesDefault implementation of  based on . YZ9None',-.1245678=>?@AHSUVX_fk>[barbiesDefault implementation of  based on .\[None',.1245678=>?@AHSUVX_fk?  None',.1245678=>?@AHSUVX_fkGbarbiesLike , but returns a binary  , instead of , which composes better.See  for usage.barbies Similar to # but one of the sides is already a  fs. Note that ,  and :# are meant to be used together:  and  combine b f1, b f2...b fn= into a single product that can then be consumed by using : on an n-ary function. E.g. f :: f a -> g a -> h a -> i a L (: f) (bf  bg  bh) ,/01KLOPQRST,KLOPQTRS/0144 None',-.1245678=>?@AHSUVX_fkqQbarbies Convert a K into a = and vice-versa.barbies)Map over both arguments at the same time.barbies A version of " specialized to a single argument.barbies)Traverse over both arguments, first over f , then over g..barbies A version of " specialized to a single argument.barbies0Conceptually, this is like simultaneously using  and o.barbies A version of " specialized to a single argument.barbies'Simultaneous product on both arguments. None',.1245678=>?@AHSUVX_fkRP/01=>@ABCDEFGHIKLOPQRSTnopqrstuxyz{|} ;None',.1245678=>?@AHSUVX_fkUDNone',.1245678=>?@AHSUVX_fkVj      !"#$%&'()*+,-./0123456789:;<&'()*+,-./0123489:;<?JMNUVWXYZ[\]^_`abhijklmvw~4M:;J<U89N?jkl~m]^w\v[ZWVYXih_`ab432./01*+,-&'()\ < = > > ?@ABCDEFGHI:JKLMNOPQRSTUVWXYZ[\]^_`abcdefghiijklmnopqrstuvwxyz{|,}~         """########%%%&&&&&&&-&.&/++++++++0000000203040011111!111111111115555556667C7C78888888999999                               ! " # $ $ % % & ' ' ( ) ) * + + , - . / 0 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H = > ? @ A B I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b cdedfdghijklmnopqrstu&v&wx+y+z+{+|+}+~++t889&barbies-2.0.0.0-ElzxHmWMSV63kGIiwdM3JCData.Barbie.ConstraintsData.Functor.ProdBarbies.InternalData.Functor.Transformer Barbies.BareData.Functor.BarbieBarbies Data.Barbie Barbies.BiBarbies.Internal.Dicts Data.Kind ConstraintBarbies.Internal.WriterData.Generics.GenericNBarbies.Internal.WearBarbies.Generics.TraversableBarbies.Generics.FunctorBarbies.Internal.FunctorTBarbies.Internal.TraversableTCanDeriveFunctorT Data.FunctorIdentityBarbies.Internal.MonadTControl.Monad.Trans.Class MonadTranslift Control.Monad=<<Barbies.Internal.FunctorBBarbies.Internal.TraversableBCanDeriveFunctorBBarbies.Generics.ConstraintsAllBBarbies.Generics.BareBarbies.Internal.BareBData.Barbie.BareBarbies.Generics.ApplicativeBarbies.Internal.ApplicativeT Data.ListzipWithzipWith3zipWith4Barbies.Internal.ConstraintsTtfoldMaptzipWith tzipWith3 tzipWith4Barbies.Internal.ApplicativeBBarbies.Internal.ConstraintsBbzipWith bzipWith3 bzipWith4Barbies.Internal.ContainersBarbies.Internal.WrappersBarbies.Internal.TrivialData.Barbie.Internal.ProductData.Barbie.Internal.ProductCuncurrynBarbies.ConstraintsClassFGClassFDict requiringDictCurried++ProdUnitCons zeroTupleoneTuple fromProduct toProductprod $fShowProd $fShowProd0 $fShow1Prod $fShow1Prod0 $fOrdProd $fOrdProd0 $fOrd1Prod $fOrd1Prod0$fEqProd $fEqProd0 $fEq1Prod $fEq1Prod0$fTraversableProd$fTraversableProd0$fFoldableProd$fFoldableProd0$fAlternativeProd$fAlternativeProd0$fApplicativeProd$fApplicativeProd0 $fFunctorProd$fFunctorProd0GenericPRepPtoPfromPGenericNRepNtoNfromNZipRecunRec FilterIndexIndexedParamWearCoveredBare GTraversable gtraverseGFunctorgmapFunctorTtmapCanDeriveTraversableT TraversableT ttraverse ttraverse_ tsequence tsequence'MonadTtlifttjointembedFunctorBbmap gbmapDefaultCanDeriveTraversableB TraversableB btraverse btraverse_ bsequence bsequence'bfoldMapgbtraverseDefaultTagSelf'TagSelfOtherSelfYXGAll GConstraints gaddDictsGBaregstripgcoverCanDeriveBareBBareBbstripbcover bstripFrom bcoverWithgbstripDefaultgbcoverDefault GApplicativegprodgpureCanDeriveApplicativeT ApplicativeTtpuretprodtziptunzipGAllRepTCanDeriveConstraintsTAllTF ConstraintsTAllT taddDictstmapC ttraverseCCanDeriveApplicativeB ApplicativeBbpurebprodbzipbunzip gbprodDefault gbpureDefaultGAllRepBCanDeriveConstraintsBAllBF ConstraintsB baddDictsbmapC btraverseC bfoldMapC bzipWithC bzipWith3C bzipWith4CbdictsbpureCbmemptygbaddDictsDefaultErrorContainergetErrorContainer Container getContainerBarbie getBarbieVoid GProductBgbprodgbuniqCanDeriveProductBProductBbuniq GProductBCgbdictsCanDeriveProductBC ProductBCbuniqC/*//*FliprunFlipbtmapbtmap1 bttraverse bttraverse1btpurebtpure1btprod$fApplicativeTkk'Flip$fTraversableTkk'Flip$fFunctorTkk'Flip$fApplicativeBkFlip$fTraversableBkFlip$fFunctorBkFlip$fEqFlip $fOrdFlip $fReadFlip $fShowFlipbaseGHC.BaseMonoid GHC.MaybeMaybeGHC.ShowShowWrexecWrtellData.Functor.ProductProduct Data.TupleuncurryData.Functor.ClassesShow1ghc-prim GHC.ClassesOrdOrd1EqEq1Data.Traversable Traversable Data.FoldableFoldable Alternative ApplicativeFunctor GHC.GenericsGenericRepfromtoGeneric1Rep1from1to1Datatype datatypeName moduleName packageName isNewtype ConstructorconName conFixity conIsRecordSelectorselNameselSourceUnpackednessselSourceStrictnessselDecidedStrictnessV1U1Par1unPar1Rec1unRec1K1unK1M1unM1:+:L1R1:*::.:Comp1unComp1RDCSRec0D1C1S1URecUAddrUCharUDoubleUFloatUIntUWorduWord#uInt#uFloat#uDouble#uChar#uAddr#precFixityPrefixInfixFixityIPrefixIInfixI AssociativityLeftAssociativeRightAssociativeNotAssociativeSourceUnpackedness SourceUnpackSourceNoUnpackNoSourceUnpackednessSourceStrictness SourceLazy SourceStrictNoSourceStrictnessDecidedStrictness DecidedLazy DecidedStrict DecidedUnpackMetaMetaDataMetaConsMetaSel GHC.TypesIntBoolTrueid gtmapDefaultData.Functor.ComposeComposefmapData.Functor.IdentityttraverseDefaulttransformers-0.5.5.0Control.Monad.Trans.ReaderReaderTMonadPairGHC.Listunzip gtprodDefault gtpureDefaultString tfoldMapC tzipWithC tzipWith3C tzipWith4CtdictstpureCtmemptymemptygtaddDictsDefaultzipData.Functor.ConstConst Data.EitherEither gbuniqDefaultgbdictsDefault