h&N       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; Free f a. When you finally want to "use" it, you can interpret it into any monadic context:  " ::  ( g => (forall x. f x -> g x) -> " f a -> g a Structurally, this is equivalent to many "nested" f's. A value of type " f a is either: a f a f (f a)  f (f (f a)).. etc.?Under the hood, this is the Church-encoded Freer monad. It's #$, or %&(, but in a way that is compatible with  ' and  (.%functor-combinators!Pattern match on and construct a  f g a as if it were f (g a).'functor-combinators(Constructor matching on the case that a  f is a nested f ( f a). Used as a part of the   and   instances.(As a constructor, this is equivalent to  .(functor-combinators(Constructor matching on the case that a  f& consists of just a single un-nested f. Used as a part of the   and   instances.)functor-combinators Convert a " f into any instance of   f.*functor-combinatorsLift an f into " f, so you can use it as a  .This is !.+functor-combinators Interpret a " f into a context g, provided that g has a   instance.This is ".,functor-combinators Extract the fs back "out" of a " f, utilizing its   instance.This is ).-functor-combinators'Swap out the underlying functor over a "/. This preserves all of the structure of the "..functor-combinators A version of 0 that doesn't require   f, by taking a RankN folding function. This is essentially a flipped $./functor-combinators A version of 0 that doesn't require   f, by folding over a  instead.0functor-combinatorsRecursively fold down a " by handling the  # case and the nested/wrapped case.This is a catamorphism.This requires   f; see . and /% for a version that doesn't require   f.1functor-combinators Convert a  f into any instance of   f.2functor-combinators f is a special subset of " f' that consists of at least one nested f0. This converts it back into the "bigger" type.See 4? for a version that preserves the "one nested layer" property.3functor-combinators#Map the underlying functor under a .4functor-combinators Because a  f is just a " f$ with at least one nested layer of f5, this function converts it back into the one-nested-f format.5functor-combinators Inject an f into a  f6functor-combinators Retract the f out of a  f, as long as the f implements  %. Since we always have at least one f, we do not need a full   constraint.7functor-combinatorsInterpret the  f in some context g, provided that g has a  . instance. Since we always have at least one f$, we will always have at least one g, so we do not need a full   constraint.8functor-combinatorsA  f is either a single un-nested f, or a f nested with another  f". This decides which is the case.9functor-combinators A version of ; that doesn't require   f, by taking a RankN folding function. This is essentially a flipped $.:functor-combinators A version of ; that doesn't require   f, by folding over a  instead.;functor-combinatorsRecursively fold down a  by handling the single f# case and the nested/wrapped case.This is a catamorphism.This requires   f; see . and /% for a version that doesn't require   f.<functor-combinators"Smart constructor" for  that doesn't require   f.=functor-combinatorsRead in terms of   and  .?functor-combinatorsShow in terms of   and  .Mfunctor-combinatorsOfunctor-combinatorsRead in terms of ( and '.Qfunctor-combinatorsShow in terms of ( and '.]functor-combinatorsgfunctor-combinatorshfunctor-combinatorsmfunctor-combinatorsnfunctor-combinators/functor-combinatorshandle  functor-combinatorshandle  0functor-combinatorshandle  functor-combinatorshandle  ;functor-combinatorshandle (.functor-combinatorshandle '. %&(' !"#$)*+,-./0123456789:;<#"#$)*+,-0./(' !('12576348;9:%&%<(c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; g with: s :: (f <~> g) -> f a -> g a t :: (f <~> g) -> g a -> a a Use s to extract the "f to g" function, and t to extract the "g to f" function. Reviewing and viewing the same value (or vice versa) leaves the value unchanged.9One nice thing is that we can compose isomorphisms using   from Prelude: ( +) :: f <~> g -> g <~> h -> f <~> h Another nice thing about this representation is that we have the "identity" isomorphism by using   from Prelude.   :: f p g As a convention, most isomorphisms have form "X-ing", where the forwards function is "ing". For example, we have: * ::  t => + t a p t f (, t f) - :: Monoidal t => SF t a  t f (MF t f) qfunctor-combinators Create an f p g1 by providing both legs of the isomorphism (the  f a -> g a and the  g a -> f a.rfunctor-combinatorsAn isomorphism between two functors that are coercible/have the same internal representation. Useful for newtype wrappers.sfunctor-combinatorsUse a p& by retrieving the "forward" function: s :: (f  ~ g) -> f a -> g a tfunctor-combinatorsUse a p( by retrieving the "backwards" function: s :: (f  ~ g) -> f a -> g a ufunctor-combinatorsLift a function  g a ~> g a to be a function  f a -> f a(, given an isomorphism between the two.One neat thing is that u i id == id.vfunctor-combinatorsReverse an isomorphism. s (v i) == t i t (v i) == s i pqrstuvpqrstuvp0(c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred-!"()*/0125689:; f a in a way that is associative.{functor-combinatorsTakes a "splitting" method and the two sub-consumers, and returns the wrapped/combined consumer.|functor-combinatorsCombine a consumer of a with a consumer of b to get a consumer of (a, b).}functor-combinatorsThe Contravariant version of  5: split the same input over two different consumers.~functor-combinators)Convenient helper function to build up a z+ by splitting input across many different f a%s. Most useful when used alongside : dsum1 $ contramap get1 x :| [ contramap get2 y , contramap get3 z ] functor-combinatorsUnlike  , requires only   on f.functor-combinatorsUnlike  , requires only   on f.functor-combinatorsUnlike  , requires only  on m.functor-combinatorsUnlike  , requires only  on m.functor-combinatorsUnlike  , requires only  on r.wxyz{|}~z{|}~wxy(c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred-!"()*/0125689:; Either b c)1). That is, it is possible to define a function (f  EitherDay f) a -> f a in a way that is associative.functor-combinatorsTakes the "decision" method and the two potential consumers, and returns the wrapped/combined consumer.functor-combinatorsFor  x y, the resulting f ( b c) will direct s to be consumed by x, and s to be consumed by y.functor-combinatorsUnlike , requires only   on f.functor-combinatorsUnlike , requires only   on f.functor-combinatorsUnlike , requires no constraint on r(c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred-!"()*/0125689:; forever, this basically conses an additional possibility of f to the beginning of it all.$You can think of it as reassociating f :+: ( f :+: f :+: f :+: ...) into f :+: f :+: f :+: f :+: ...   ( "hello") --  0 "hello" stepUp (% (Step 1 "hello")) -- Step 2 "hello" Forms an isomorphism with  (see ).functor-combinators)We have a natural transformation between  and any other functor f with no constraints.functor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsAn f a, along with a   flag  f a ~ (  , f a) Flagged f ~ ((,) Bool)   f -- functor composition Creation with ! or   uses  as the boolean.You can think of it as an f a that is "flagged" with a boolean value, and that value can indicuate whether or not it is "pure" (made with ! or  ) as 0, or "impure" (made from some other source) as  . However,  may be always created directly, of course, using the constructor.You can think of it like a  that is either 0 or 1, as well."5ing it requires no constraint on the target context.6This type is equivalent (along with its instances) to: 7 89 :1 functor-combinators"Uncons and cons" an f branch before a %. This is basically a witness that  and  form an isomorphism.functor-combinatorsPop off the first item in a  . Because a  f is f  f  f  ...+ forever, this matches on the first branch.$You can think of it as reassociating f  f  f  f  ... into f  ( f  f  f  ...)  It returns: if the first item is the only item in the  if the first item in the  is empty, but there are more items left. The extra items are all shfited down. if the first item in the  exists, and there are also more items left. The extra items are all shifted down.Forms an isomorphism with  (see ).functor-combinatorsUnshift an item into a  . Because a  f is f  f  f  f  ...> forever, this basically conses an additional possibility of f to the beginning of it all.$You can think of it as reassociating f  ( f  f  f  ...) into f  f  f  f  ...  If you give:, then it returns a singleton  with one item at index 0), then it shifts every item in the given  up one index.), then it shifts every item in the given 0 up one index, and adds the given item (the f) at index zero.Forms an isomorphism with  (see ).functor-combinatorsLeft-biased untionfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsAppends the items back-to-back, shifting all of the items in the second map. Matches the behavior as the fixed-point of .functor-combinators a b is uninhabited for all a and b.functor-combinatorsUses  for .functor-combinatorsUses  for  , and  for .functor-combinators a b is uninhabited for all a and b.functor-combinatorsIf you treat a  f a as a functor combinator, then  lets you convert from a  f a into a t f a for any functor combinator t.functor-combinatorsfunctor-combinatorsfunctor-combinatorsIf you treat a  f a' as a binary functor combinator, then  lets you convert from a  f a into a t f a for any functor combinator t.functor-combinatorsfunctor-combinators(c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; (b, c), feeds it to the original f b and f c/, and then re-combines the output back into a a with the  b -> c -> a.functor-combinatorsLike , , {, or  >, but requires both a splitting and a recombining function.  and ) require only a combining function, and { and  $ require only a splitting function.It is used to merge f b (producer and consumer of b) and f c (producer and consumer of c ) into a f a$. You can think of it as, for the f a, it "splits" the a into b and c with the  a -> (b, c), feeds it to the original f b and f c/, and then re-combines the output back into a a with the  b -> c -> a.1An important property is that it will always use both of the ccomponents given in order to fulfil its job. If you gather an f a and an f b into an f c#, in order to consume/produdce the c, it will always use both the f a or the f b -- exactly one of them.functor-combinatorsA simplified version of 0 that combines into a tuple. You can then use % to reshape it into the proper shape.functor-combinators!Interpret out of a contravariant  into any instance of * by providing two interpreting functions.This should go in Data.Functor.Invariant.Day-, but that module is in a different package.functor-combinatorsSquash the two items in a  using their natural  instances.This should go in Data.Functor.Invariant.Day-, but that module is in a different package.functor-combinatorsIgnores the covariant part of functor-combinatorsIgnores the covariant part of functor-combinators"Ignores the contravariant part of functor-combinators  _ =  functor-combinators  _ =  functor-combinators  =  functor-combinatorsWrap an   that is not necessarily a z.functor-combinators  =  functor-combinators"Ignores the contravariant part of functor-combinators"Convenient wrapper to build up an  instance by providing each component of it. This makes it much easier to build up longer chains because you would only need to write the splitting/joining functions in one place.#For example, if you had a data type !data MyType = MT Int Bool String and an invariant functor and  instance Prim4 (representing, say, a bidirectional parser, where Prim Int# is a bidirectional parser for an 9), then you could assemble a bidirectional parser for a MyType@ using: invmap ((MyType x y z) -> I x :* I y :* I z :* Nil) ((I x :* I y :* I z :* Nil) -> MyType x y z) $ gatheredN $ intPrim :* boolPrim :* stringPrim :* Nil Some notes on usefulness depending on how many components you have:If you have 0 components, use  directly.1If you have 1 component, you don't need anything.If you have 2 components, use  directly.If you have 3 or more components, these combinators may be useful; otherwise you'd need to manually peel off tuples one-by-one.functor-combinators3Given a function to "break out" a data type into a : (tuple) and one to put it back together from the tuple, ! all of the components together.#For example, if you had a data type !data MyType = MT Int Bool String and an invariant functor and  instance Prim4 (representing, say, a bidirectional parser, where Prim Int# is a bidirectional parser for an 9), then you could assemble a bidirectional parser for a MyType@ using:  concaMapInplicative ((MyType x y z) -> I x :* I y :* I z :* Nil) ((I x :* I y :* I z :* Nil) -> MyType x y z) $ intPrim :* boolPrim :* stringPrim :* Nil  See notes on  for more details and caveats.functor-combinators A version of  for non-empty , but only requiring an  instance.functor-combinators A version of  for non-empty , but only requiring an  instance.functor-combinators A version of  using  from vinyl instead of  from sop-core. This can be more convenient because it doesn't require manual unwrapping/wrapping of tuple components.functor-combinators A version of  using  from vinyl instead of  from sop-core. This can be more convenient because it doesn't require manual unwrapping/wrapping of tuple components.functor-combinatorsConvenient wrapper to  over multiple arguments using tine vinyl library's multi-arity uncurrying facilities. Makes it a lot more convenient than using > multiple times and needing to accumulate intermediate types.#For example, if you had a data type !data MyType = MT Int Bool String and an invariant functor and  instance Prim4 (representing, say, a bidirectional parser, where Prim Int# is a bidirectional parser for an 9), then you could assemble a bidirectional parser for a MyType@ using:  MT -- ^ curried assembling function ((MT x y z) -> x ::& y ::& z ::& XRNil) -- ^ disassembling function (intPrim :: Prim Int) (boolPrim :: Prim Bool) (stringPrim :: Prim String) Really only useful with 3 or more arguments, since with two arguments this is just - (and with zero arguments, you can just use ).The generic type is a bit tricky to understand, but it's easier to understand what's going on if you instantiate with concrete types: ghci> :t gatherN MyInplicative '[Int, Bool, String] (Int -> Bool -> String -> b) -> (b -> XRec Identity '[Int, Bool, String]) -> MyInplicative Int -> MyInplicative Bool -> MyInplicative String -> MyInplicative b functor-combinators A version of  using  from vinyl instead of  from sop-core. This can be more convenient because it doesn't require manual unwrapping/wrapping of components.functor-combinators A version of  using  from vinyl instead of  from sop-core. This can be more convenient because it doesn't require manual unwrapping/wrapping of tuple components.functor-combinators: but with at least one argument, so can be used with any .functor-combinators!Interpret out of a contravariant  into any instance of  * by providing two interpreting functions.In theory, this should not need to exist, since you should always be able to use  because every instance of   is also an instance of ?. However, this can be handy if you are using an instance of   that has no  instance. Consider also  unsafeInplyCo0 if you are using a specific, concrete type for h.functor-combinators!Interpret out of a contravariant  into any instance of z* by providing two interpreting functions.In theory, this should not need to exist, since you should always be able to use  because every instance of z is also an instance of ?. However, this can be handy if you are using an instance of z that has no  instance. Consider also unsafeInplyContra0 if you are using a specific, concrete type for h.functor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinators  _ =  functor-combinatorsIgnores the covariant part of functor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinators%Does not require Eq k since base-4.16functor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinators (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:;/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any   f%, produce a value that would require   f.&Always use with concrete and specific f only, and never use with any f that already has a   instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any   f%, produce a value that would require   f.&Always use with concrete and specific f only, and never use with any f that already has a   instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any   f&, produce a value that would require  f.&Always use with concrete and specific f only, and never use with any f that already has a  instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any  f%, produce a value that would require  f.&Always use with concrete and specific f only, and never use with any f that already has a  instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any   f%, produce a value that would require z f.&Always use with concrete and specific f only, and never use with any f that already has a z instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any   f%, produce a value that would require  f.&Always use with concrete and specific f only, and never use with any f that already has an  instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any  f%, produce a value that would require  f.&Always use with concrete and specific f only, and never use with any f that already has an  instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any   f%, produce a value that would require  f.&Always use with concrete and specific f only, and never use with any f that already has an  instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any z f%, produce a value that would require  f.&Always use with concrete and specific f only, and never use with any f that already has an  instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any   f&, produce a value that would require  f.&Always use with concrete and specific f only, and never use with any f that already has an  instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.functor-combinatorsFor any  Divisibl3 f&, produce a value that would require  f.&Always use with concrete and specific f only, and never use with any f that already has an  instance.The =>/ argument allows you to specify which specific f7 you want to enhance. You can pass in something like => @MyFunctor.   (c) Justin Le 2021BSD3 justin@jle.im experimental non-portable Safe-Inferred.!"()*/0125689:;  b c#, feeds it to either the original f b or the original f c., and then re-injects the output back into a a with the b -> a or the c -> a.functor-combinatorsLike , , or :, but requires both an injecting and a choosing function.It is used to merge f b (producer and consumer of b) and f c (producer and consumer of c ) into a f a: in an either-or manner. You can think of it as, for the f a, it "chooses" if the a is actually a b or a c with the a ->  b c#, feeds it to either the original f b or the original f c., and then re-injects the output back into a a with the b -> a or the c -> a. Z (I x); MTB y -> S (Z (I y)); MTS z -> S (S (Z (I z)))) (case Z (I x) -> MTI x; S (Z (I y)) -> MTB y; S (S (Z (I z))) -> MTS z) $ swervedN $ intPrim :* boolPrim :* stringPrim :* Nil Some notes on usefulness depending on how many components you have:If you have 0 components, use  directly.If you have 1 component, use inject directly.If you have 2 components, use  directly.If you have 3 or more components, these combinators may be useful; otherwise you'd need to manually peel off eithers one-by-one.functor-combinators Z (I x); MTB y -> S (Z (I y)); MTS z -> S (S (Z (I z)))) (case Z (I x) -> MTI x; S (Z (I y)) -> MTB y; S (S (Z (I z))) -> MTS z) $ $ intPrim :* boolPrim :* stringPrim :* Nil Some notes on usefulness depending on how many components you have:If you have 0 components, use  directly.1If you have 1 component, you don't need anything.If you have 2 components, use  directly.If you have 3 or more components, these combinators may be useful; otherwise you'd need to manually peel off eithers one-by-one. See notes on  for more details and caveats.functor-combinators A version of  for non-empty , but only requiring an  instance.functor-combinators A version of  for non-empty , but only requiring an  instance.functor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsIgnores the covariant part of functor-combinatorsIgnores the covariant part of functor-combinatorsIgnores the covariant part of functor-combinators"Ignores the contravariant part of functor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinators  = functor-combinators  = functor-combinators  = functor-combinators  _ = functor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinators%Does not require Eq k since base-4.16functor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinators   (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; into the covariant version, dropping the contravariant part.+Note that there is no covariant version of  defined in any common library, so we use an equivalent type (if f and g are  s) f  g.functor-combinatorsConvert an invariant > into the covariant version, dropping the contravariant part. This version does not require a   constraint because it converts to the coyoneda-wrapped product, which is more accurately the covariant  convolution.functor-combinatorsConvert an invariant > into the contravariant version, dropping the covariant part.functor-combinatorsInterpret out of a  into any instance of * by providing two interpreting functions.functor-combinatorsSquash the two items in a  using their natural  instances.functor-combinators is associative.functor-combinators is associative.functor-combinatorsThe left identity of  is (; this is one side of that isomorphism.functor-combinatorsThe right identity of  is (; this is one side of that isomorphism.functor-combinatorsThe left identity of  is (; this is one side of that isomorphism.functor-combinatorsThe right identity of  is (; this is one side of that isomorphism.functor-combinatorsThe two sides of a  can be swapped.functor-combinators)Hoist a function over the left side of a .functor-combinators*Hoist a function over the right side of a .? Safe-Inferred-!"()*/0125689:; has the ability to constrain the contexts to some typeclass.The main law is that binding  should leave things unchanged:   ==   But 2 should also be associatiatve, in a way that makes  . hjoin = hjoin .  hjoin That is, squishing a  t (t (t f)) a into a t f a can be done "inside" first, then "outside", or "outside" first, then "inside".-Note that these laws are different from the () laws, so we often have instances where  and "> (though they both may typecheck) produce different behavior.This class is similar to AE from Control.Monad.Morph$, but instances must work without a   constraint.functor-combinatorsBind a continuation to a t f into some context g.functor-combinatorsCollapse a nested t (t f) into a single t f.functor-combinatorsA typeclass for s where you can "inject" an f a into a t f a:  :: f a -> t f a If you think of t f a as an "enhanced f", then  allows you to use an f as its enhanced form.?With the exception of directly pattern matching on the result, 8 itself is not too useful in the general case without (0 to allow us to interpret or retrieve back the f.functor-combinators Lift from f into the enhanced t f structure. Analogous to  from . Note that this lets us "lift" a f a; if you want to lift an a with  a -> t f a , check if t f is an instance of   or .functor-combinatorsAn " combinator" that turns an - into potentially infinite nestings of that .An  t f a is either f a, t f a,  t (t f) a, t (t (t f)) a, etc.This effectively turns t into a tree with t branches.&One particularly useful usage is with . For example if you had a data type representing a command line command parser: data Command a 8You could represent "many possible named commands" using type Commands =   Command And you can represent multiple nested named commands using: type NestedCommands =  ( )  This has an ( instance, but it can be more useful to use via direct pattern matching, or through  ::  t => f ) g -> t g ~> g -> HFree t f ~> g &which requires no extra constriant on g0, and lets you consider each branch separately.4This can be considered the higher-oder analogue of #$; it is the free  for any  t. Note that   is equivalent to .functor-combinatorsAn " combinator" that enhances an $ with the ability to hold a single f a). This is the higher-order analogue of .You can think of it as a free  for any f. Note that   is equivalent to  FG.functor-combinatorsA higher-level ) to get a t f a back out of an  t f a , provided t is an instance of .This witnesses the fact that  is the "Free ".functor-combinatorsRecursively fold down an  into a single g= result, by handling each branch. Can be more useful than " because it allows you to treat each branch separately, and also does not require any constraint on g.This is the catamorphism on .functor-combinatorsA higher-level ) to get a t f a back out of an  t f a , provided t is an instance of  .This witnesses the fact that  is the "Free  ".functor-combinatorsA useful wrapper over the common pattern of fmap-before-inject/inject-and-fmap.functor-combinatorsA useful wrapper over the common pattern of contramap-before-inject/inject-and-contramap.functor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinatorsfunctor-combinators is the "free  and  " for any functor-combinators Only uses functor-combinators Only uses functor-combinators Injects with .Equivalent to instance for  FG and  .functor-combinators4Injects into a singleton map at 0; same behavior as  (FH IJ).functor-combinatorsInjects with 0.Equivalent to instance for  (FH IJ).functor-combinators Injects into a singleton map at .functor-combinators Injects into a singleton map at .functor-combinatorsfunctor-combinators is the "free  " for any functor-combinators'Combines the accumulators, Writer-stylefunctor-combinatorsEquivalent to instance for  FG and  .functor-combinatorsEquivalent to instance for  (FH IJ).(c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; f a. For example, " f is f* enhanced with monadic structure. We get:  :: f a -> " f a  ::   m => (forall x. f x -> m x) -> " f a -> m a  will let us use our f inside the enhanced " f.  will let us "extract" the f from a " f if we can give an interpreting function that interprets f into some target  .We enforce that:  id .  == id -- or  .  == id That is, if we lift a value into our structure, then immediately interpret it out as itself, it should lave the value unchanged.&Note that instances of this class are intended to be written with t# as a fixed type constructor, and f to be allowed to vary freely: %instance Monad f => Interpret Free f Any other sort of instance and it's easy to run into problems with type inference. If you want to write an instance that's "polymorphic" on tensor choice, use the  newtype wrapper over a type variable, where the second argument also uses a type constructor: ,instance Interpret (WrapHF t) (MyFunctor t) 5This will prevent problems with overloaded instances.functor-combinators Remove the f out of the enhanced t f structure, provided that f satisfies the necessary constraints. If it doesn't, it needs to be properly ed out.functor-combinators%Given an "interpeting function" from f to g, interpret the f out of the t f into a final context g.functor-combinators A convenient flipped version of .functor-combinatorsUseful wrapper over + to allow you to directly extract a value b out of the t f a, if you can convert f x into b.*Note that depending on the constraints on f in  t f%, you may have extra constraints on b.If f/ is unconstrained, there are no constraints on bIf f must be  , , z, or , b needs to be an instance of .If f is  , ,  , or , b needs to be an instance of For some constraints (like  ), this will not be usable. -- get the length of the  Map String in the . 3 length :: Step (Map String) Bool -> Int +Note that in many cases, you can also use K and L.functor-combinators(Deprecated) Old name for '; will be removed in a future version.functor-combinatorsUseful wrapper over  to allow you to collect a b from all instances of f inside a t f a.%Will work if there is an instance of  t ( m) if  m, which will be the case if the constraint on the target functor is  ,  ,  , , , ,  , , , or unconstrained. -- get the lengths of all  Map String s in the  . 3 length :: Ap (Map String) Bool -> [Int] +Note that in many cases, you can also use M.functor-combinators(Deprecated) Old name for '; will be removed in a future version.functor-combinatorsUseful wrapper over  to allow you to collect a b from all instances of f inside a t f a!, into a non-empty collection of bs.%Will work if there is an instance of  t ( m) if  m, which will be the case if the constraint on the target functor is  ,  , , z, , or unconstrained. -- get the lengths of all  Map String s in the  . . length :: Ap1 (Map String) Bool ->  Int +Note that in many cases, you can also use N.functor-combinatorsUseful wrapper over $ to allow you to do an "effectful" .This can be useful in some situations, but if you want to do this, it's probably better to just use O<, which is a more principled system for effectful hmapping.functor-combinatorsUseful wrapper over 3 to allow you to directly consume a value of type a with a t f a to create a b<. Do this by supplying the method by which each component f x can consume an x;. This works for contravariant functor combinators, where t f a& can be interpreted as a consumer of as.*Note that depending on the constraints on f in  t f%, you may have extra constraints on b.If f is unconstrained, , or $, there are no constraints on b. This will be the case for combinators like contravariant , Dec, Dec1.If f must be z, b" needs to be an instance of .. This will be the case for combinators like Div1.If f is  , b needs to be an instance of 3. This will be the case for combinators like Div.For any   or  constraint, this is not usable.functor-combinatorsUseful wrapper over 3 to allow you to directly consume a value of type a with a t f a to create a b , and create a list of all the bs created by all the f=s. Do this by supplying the method by which each component f x can consume an x;. This works for contravariant functor combinators, where t f a& can be interpreted as a consumer of as.%Will work if there is an instance of  t ( m) if  m, which will be the case if the constraint on the target functor is , , , z,  , or unconstrained.0Note that this is really only useful outside of  for Div and Div1 , where a Div f) which is a collection of many different f?s consuming types of different values. You can use this with Dec and Dec1 and the contravarient  as well, but those would always just give you a singleton list, so you might as well use 5. This is really only here for completion alongside 8, or if you define your own custom functor combinators.functor-combinatorsUseful wrapper over 3 to allow you to directly consume a value of type a with a t f a to create a b , and create a list of all the bs created by all the f=s. Do this by supplying the method by which each component f x can consume an x;. This works for contravariant functor combinators, where t f a& can be interpreted as a consumer of as.%Will work if there is an instance of  t ( m) if  m, which will be the case if the constraint on the target functor is , , z, or unconstrained.0Note that this is really only useful outside of  and  for Div1 , where a Div1 f* which is a collection of many different f>s consuming types of different values. You can use this with Dec and Dec1 and the contravarient  as well, but those would always just give you a singleton list, so you might as well use 6. This is really only here for completion alongside 7, or if you define your own custom functor combinators.functor-combinators Never uses functor-combinators Never uses functor-combinators!This ignores the environment, so  /= functor-combinatorsA free , but only when applied to a  .functor-combinatorsA free functor-combinatorsA free functor-combinatorsA free  functor-combinatorsA free  functor-combinatorsA free  functor-combinatorsA free  functor-combinators Technically, f# is over-constrained: we only need  :: f a, but we don't really have that typeclass in any standard hierarchies. We use  here instead, but we never use . This would only go wrong in situations where your type supports  but not , like instances of PQ without RS.functor-combinators Technically, f# is over-constrained: we only need  :: f a, but we don't really have that typeclass in any standard hierarchies. We use  here instead, but we never use . This would only go wrong in situations where your type supports  but not , like instances of PQ without RS.functor-combinatorsA free functor-combinators Technically, f# is over-constrained: we only need  :: f a, but we don't really have that typeclass in any standard hierarchies. We use  here instead, but we never use . This would only go wrong in situations where your type supports  but not , like instances of PQ without RS.functor-combinatorsEquivalent to instance for  FG and  .functor-combinatorsEquivalent to instance for  (FH IJ).functor-combinators Technically, f# is over-constrained: we only need  :: f a, but we don't really have that typeclass in any standard hierarchies. We use  here instead, but we never use . This would only go wrong in situations where your type supports  but not , like instances of PQ without RS.functor-combinatorsA free functor-combinatorsA free functor-combinatorsA free  functor-combinatorsA free functor-combinatorsA free  functor-combinators Unlike for ', this is possible because there is no  instance to complicate things.functor-combinators Unlike for ', this is possible because there is no  instance to complicate things.functor-combinators Unlike for ', this is possible because there is no  instance to complicate things.functor-combinators Unlike for ', this is possible because there is no  instance to complicate things.(c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; MonoidIn (WrapHBF t) (WrapF i) (  t i f) where pureT is   and  biretract is  appendChain."This construction is inspired by 6http://oleg.fi/gists/posts/2018-02-21-single-free.html functor-combinatorsA useful construction that works like a "non-empty linked list" of t f9 applied to itself multiple times. That is, it contains t f f,  t f (t f f), t f (t f (t f f)) , etc, with f occuring  one or more( times. It is meant to be the same as  NonEmptyBy t.A   t f a is explicitly one of: f a t f f a  t f (t f f) a t f (t f (t f f)) a.. etc-Note that this is exactly the description of  NonEmptyBy t1. And that's "the point": for all instances of  Associative,   t is isomorphic to  NonEmptyBy t (witnessed by  unrollingNE). That's big picture of  NonEmptyBy: it's supposed to be a type that consists of all possible self-applications of f to t. " gives you a way to work with all  NonEmptyBy t in a uniform way. Unlike for  NonEmptyBy t f= in general, you can always explicitly /pattern match/ on a   (with its two constructors) and do what you please with it. You can also  construct  * using normal constructors and functions.You can convert in between  NonEmptyBy t f and   t f with unrollNE and rerollNE. You can fully "collapse" a   t f into an f with , if you have  SemigroupIn t f; this could be considered a fundamental property of semigroup-ness.See  ) for a version that has an "empty" value.(Another way of thinking of this is that   t is the "free  SemigroupIn t". Given any functor f,   t f is a semigroup in the semigroupoidal category of endofunctors enriched by t. So,    is the "free ZD",   Day is the "free  ", etc. You "lift" from f a to   t f a using .Note: this instance doesn't exist directly because of restrictions in typeclasses, but is implemented as  Associative t =>  SemigroupIn (WrapHBF t) (  t f) where  biretract is  appendChain1.You can fully "collapse" a   t i f into an f with , if you have MonoidIn t i f; this could be considered a fundamental property of monoid-ness.8This construction is inspired by iteratees and machines. functor-combinatorsRecursively fold down a  4. Provide a function on how to handle the "single f case" (#), and how to handle the "combined t f g& case", and this will fold the entire   t f into a single g.This is a catamorphism. functor-combinatorsAn "effectful" version of  , weaving Applicative effects. functor-combinatorsRecursively build up a  5. Provide a function that takes some starting seed g and returns either "done" (f) or "continue further" (t f g), and it will create a   t f from a g.This is an anamorphism. functor-combinators#Convert a tensor value pairing two fs into a two-item  . An analogue of  toNonEmptyBy. functor-combinatorsCreate a singleton  . functor-combinators)For completeness, an isomorphism between  % and its two constructors, to match matchNE. functor-combinatorsRecursively fold down a  4. Provide a function on how to handle the "single f case" (nilLB#), and how to handle the "combined t f g' case", and this will fold the entire   t i) f into a single g.This is a catamorphism. functor-combinatorsAn "effectful" version of  , weaving Applicative effects. functor-combinatorsRecursively build up a  5. Provide a function that takes some starting seed g and returns either "done" (i) or "continue further" (t f g), and it will create a   t i f from a g.This is an anamorphism. functor-combinators)For completeness, an isomorphism between  % and its two constructors, to match  splittingLB. functor-combinatorsAn analogue of unconsLB*: match one of the two constructors of a  .functor-combinatorsfunctor-combinatorsfunctor-combinatorsA free functor-combinatorsA free  functor-combinatorshandle  functor-combinatorshandle  functor-combinatorshandle  functor-combinatorshandle  functor-combinatorsHandle  functor-combinatorsHandle  functor-combinatorsHandle  functor-combinatorsHandle   (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred-!"()*/0125689:; f 4This gives us the ability to squash applications of t.Formally, if we have   t, we are enriching the category of endofunctors with semigroup structure, turning it into a semigroupoidal category. Different choices of t+ give different semigroupoidal categories. A functor f is known as a "semigroup in the (semigroupoidal) category of endofunctors on t " if we can  :  t f f ~> f This gives us a few interesting results in category theory, which you can stil reading about if you don't care:All? functors are semigroups in the semigroupoidal category on The class of functors that are semigroups in the semigroupoidal category on 3 is exactly the functors that are instances of .The class of functors that are semigroups in the semigroupoidal category on 3 is exactly the functors that are instances of  .The class of functors that are semigroups in the semigroupoidal category on 3 is exactly the functors that are instances of  .&Note that instances of this class are intended to be written with t# as a fixed type constructor, and f to be allowed to vary freely: &instance Bind f => SemigroupIn Comp f Any other sort of instance and it's easy to run into problems with type inference. If you want to write an instance that's "polymorphic" on tensor choice, use the   newtype wrapper over a type variable, where the second argument also uses a type constructor: 1instance SemigroupIn (WrapHBF t) (MyFunctor t i) 5This will prevent problems with overloaded instances. functor-combinatorsThe  analogy of . It retracts both fs into a single f), effectively fully mixing them together.This function makes f a semigroup in the category of endofunctors with respect to tensor t. functor-combinatorsThe  analogy of . It takes two interpreting functions, and mixes them together into a target functor h.Note that this is useful in the poly-kinded case, but it is not possible to define generically for all  ! because it only is defined for  Type -> Type inputes. See  ( for a version that is poly-kinded for  in specific. functor-combinatorsAn / where it doesn't matter which binds first is  . Knowing this gives us a lot of power to rearrange the internals of our  at will.%For example, for the functor product: data (f  g) a = f a :*: g a  We know that f :*: (g :*: h) is the same as (f :*: g) :*: h.Formally, we can say that t enriches a the category of endofunctors with semigroup strcture: it turns our endofunctor category into a "semigroupoidal category".Different instances of t each enrich the endofunctor category in different ways, giving a different semigroupoidal category. functor-combinators0The "semigroup functor combinator" generated by t.A value of type NonEmptyBy t f a is  equivalent to one of: f a t f f a  t f (t f f) a t f (t f (t f f)) a t f (t f (t f (t f f))) a.. etcFor example, for  , we have . This is because: x ~  (x  []) ~  x x & y ~ NonEmptyF (x :| [y]) ~  : (x :*: y) x :*: y :*: z ~ NonEmptyF (x :| [y,z]) -- etc. 'You can create an "singleton" one with , or else one from a single t f f with  .See b. for a "possibly empty" version of this type. functor-combinatorsA description of "what type of Functor" this tensor is expected to be applied to. This should typically always be either  , , or . functor-combinatorsThe isomorphism between  t f (t g h) a and  t (t f g) h a!. To use this isomorphism, see   and  . functor-combinatorsIf a   t f% represents multiple applications of t f+ to itself, then we can also "append" two   t f(s applied to themselves into one giant   t f containing all of the t fs.1Note that this essentially gives an instance for   t (NonEmptyBy t f), for any functor f. functor-combinatorsIf a   t f% represents multiple applications of t f to itself, then we can split it based on whether or not it is just a single f* or at least one top-level application of t f.)Note that you can recursively "unroll" a   completely into a c by using d. functor-combinatorsPrepend an application of t f to the front of a   t f. functor-combinatorsEmbed a direct application of f to itself into a   t f. functor-combinatorsReassociate an application of t. functor-combinatorsReassociate an application of t. functor-combinatorsAn implementation of ! that works for any instance of   t for   t.?Can be useful as a default implementation if you already have   implemented. functor-combinatorsAn implementation of ! that works for any instance of   t for   t.?Can be useful as a default implementation if you already have   implemented. functor-combinatorsAn   t f* represents the successive application of t to f1, over and over again. So, that means that an   t f must either be a single f, or an t f (NonEmptyBy t f). , states that these two are isomorphic. Use   and     & to convert between one and the other. functor-combinatorsUseful wrapper over  + to allow you to directly extract a value b out of the t f g a, if you can convert an f x and g x into b.*Note that depending on the constraints on h in   t h%, you may have extra constraints on b.If h/ is unconstrained, there are no constraints on bIf h must be  , , z, or , b needs to be an instance of If h is  , , ef , or g, b" needs to be an instance of For some constraints (like  ), this will not be usable. -- Return the length of either the list, or the Map, depending on which -- one s in the     length :: ([] :+: h3 )  -> Int -- Return the length of both the list and the map, added together   (iH! . length) (Sum . length) :: " [] (Map Int) Char -> Sum Int functor-combinatorsInfix alias for  -- Return the length of either the list, or the Map, depending on which -- one s in the     length :: ([] :+: h3 )  -> Int -- Return the length of both the list and the map, added together iH" . length !$! Sum . length :: " [] (Map Int) Char -> Sum Int functor-combinatorsInfix alias for  Note that this is useful in the poly-kinded case, but it is not possible to define generically for all  ! because it only is defined for  Type -> Type inputes. See  ( for a version that is poly-kinded for  in specific. functor-combinators A version of   specifically for  that is poly-kinded functor-combinatorsUseful wrapper over  + to allow you to directly extract a value b out of the t f g a, if you can convert an f x and g x into b , given an x input.*Note that depending on the constraints on h in   t h%, you may have extra constraints on b.If h/ is unconstrained, there are no constraints on bIf h must be z, or  Divisible, b needs to be an instance of If h must be  Divisible, then b needs to be an instance of .For some constraints (like  ), this will not be usable. functor-combinators Ideally here   would be equivalent to b, just like for . This should be possible if we can write a bijection. This bijection should be possible in theory --- but it has not yet been implemented. functor-combinators functor-combinators functor-combinators Instances of  3 are semigroups in the semigroupoidal category on . functor-combinators>All functors are semigroups in the semigroupoidal category on . functor-combinators>All functors are semigroups in the semigroupoidal category on . functor-combinators>All functors are semigroups in the semigroupoidal category on . functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators Instances of  3 are semigroups in the semigroupoidal category on . functor-combinators Instances of 3 are semigroups in the semigroupoidal category on . functor-combinators Instances of 3 are semigroups in the semigroupoidal category on .   5 5 5j Safe-Inferred,!"()*/0125689:; (a, [a]) [a].Note that because t is not inferrable from the input or output type, you should call this using -XTypeApplications:   @() ::  NonEmptyF f a -> ListF f a fromNE @Comp :: Free1 f a -> Free f a functor-combinatorsCreate the "empty  ".If   t f% represents multiple applications of t f with itself, then nilLB gives us "zero applications of f". Note that t6 cannot be inferred from the input or output type of  , so this function must always be called with -XTypeApplications:   @Day :: Identity  Ap f nilLB @Comp :: Identity ~> Free f nilLB @() :: Proxy ~> ListF f 1Note that this essentially gives an instance for MonoidIn t i (ListBy t f), for any functor f; this is witnessed by WrapLB. functor-combinators!Lets us "cons" an application of f to the front of an   t f. functor-combinators"Pattern match" on an   tAn   t f- is either empty, or a single application of t to f and  ListBy t f (the "head" and "tail")"This is analogous to the function kl :: [a] -> Maybe (a, [a]). functor-combinators  is a monoid with respect to t: we can "combine" them in an associative way. The identity here is anything made with the   constructor.This is essentially  , but only requiring   t i: it comes from the fact that   t i is the "free MonoidIn t i". pureT is  . functor-combinatorsA type   t9 is supposed to represent the successive application of ts to itself.   makes that successive application explicit, buy converting it to a literal   of applications of t to itself.   =     functor-combinatorsA type   t9 is supposed to represent the successive application of ts to itself.   takes an explicit   of applications of t( to itself and rolls it back up into an   t.   =       Because t cannot be inferred from the input or output, you should call this with -XTypeApplications:   @m ::   Comp no f a -> $ f a functor-combinatorsA type   t9 is supposed to represent the successive application of ts to itself.   takes an explicit   of applications of t( to itself and rolls it back up into an   t.   =      functor-combinators$The "forward" function representing splittingChain1. Provided here as a separate function because it does not require   f. (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:;  a. functor-combinators"Pattern match" on an   t f<: it is either empty, or it is non-empty (and so can be an   t f).This is analgous to a function `p :: [a] -> Maybe ( a).Note that because t cannot be inferred from the input or output type, you should use this with -XTypeApplications:   @ ::   f a -> ( :+:   f) a )Note that you can recursively "unroll" a   completely into a q by using r. functor-combinators=This class effectively gives us a way to generate a value of f a based on an i a, for   t i. Having this ability makes a lot of interesting functions possible when used with   from   that weren't possible without it: it gives us a "base case" for recursion in a lot of cases.Essentially, we get an i ~> f,  , where we can introduce an f a as long as we have an i a.Formally, if we have   t i, we are enriching the category of endofunctors with monoid structure, turning it into a monoidal category. Different choices of t$ give different monoidal categories. A functor f is known as a "monoid in the (monoidal) category of endofunctors on t " if we can  :  t f f ~> f  and also  : i ~> f This gives us a few interesting results in category theory, which you can stil reading about if you don't care:All6 functors are monoids in the monoidal category on The class of functors that are monoids in the monoidal category on 3 is exactly the functors that are instances of .The class of functors that are monoids in the monoidal category on 3 is exactly the functors that are instances of  .The class of functors that are monoids in the monoidal category on 3 is exactly the functors that are instances of  .This is the meaning behind the common adage, "monads are just monoids in the category of endofunctors". It means that if you enrich the category of endofunctors to be monoidal with , then the class of functors that are monoids in that monoidal category are exactly what monads are. However, the adage is a little misleading: there are many other ways to enrich the category of endofunctors to be monoidal, and  is just one of them. Similarly, the class of functors that are monoids in the category of endofunctors enriched by  are  .&Note that instances of this class are intended to be written with t and i$ to be fixed type constructors, and f to be allowed to vary freely: -instance Monad f => MonoidIn Comp Identity f Any other sort of instance and it's easy to run into problems with type inference. If you want to write an instance that's "polymorphic" on tensor choice, use the   and   newtype wrappers over type variables, where the third argument also uses a type constructor: 8instance MonoidIn (WrapHBF t) (WrapF i) (MyFunctor t i) 5This will prevent problems with overloaded instances. functor-combinatorsIf we have an i, we can generate an f! based on how it interacts with t.+Specialized (and simplified), this type is:   @ ::   f =>  a -> f a --   pureT @ ::  " f => Identity a -> f a --   pureT @() ::  f =>  a -> f a --  Note that because t appears nowhere in the input or output types, you must always use this with explicit type application syntax (like  pureT @Day) Along with  , this function makes f a monoid in the category of endofunctors with respect to tensor t. functor-combinatorsf is isomorphic to t f i : that is, i is the identity of t, and leaves f unchanged. functor-combinatorsg is isomorphic to t i g : that is, i is the identity of t, and leaves g unchanged. functor-combinators  (  and  ) for  actually does not require  $. This is the more general version. functor-combinators  (  and  ) for  actually does not require  $. This is the more general version. functor-combinators  (  and  ) for  actually does not require  $. This is the more general version. functor-combinators  (  and  ) for  actually does not require  $. This is the more general version. functor-combinatorsA poly-kinded version of   for . functor-combinatorsA poly-kinded version of   for . functor-combinatorsAn implementation of ! that works for any instance of   t i for   t.>Can be useful as a default implementation if you already have   implemented. functor-combinatorsAn implementation of ! that works for any instance of   t i for   t.>Can be useful as a default implementation if you already have   implemented. functor-combinatorsConvenient wrapper over  . that lets us introduce an arbitrary functor g to the right of an f.You can think of this as an  analogue of . functor-combinatorsConvenient wrapper over  . that lets us introduce an arbitrary functor f to the right of a g.You can think of this as an  analogue of . functor-combinatorsConvenient wrapper over  . that lets us drop one of the arguments of a  > for free, without requiring any extra constraints (like for  ).See  % for a version that does not require   f, specifically for . functor-combinatorsConvenient wrapper over  . that lets us drop one of the arguments of a  8 for free, without requiring any constraints (like for  ).See  % for a version that does not require   g, specifically for . functor-combinatorsAn   t f is isomorphic to an f consed with an   t f, like how a  a is isomorphic to (a, [a]). functor-combinatorsAn   t f) is isomorphic to either the empty case (i) or the non-empty case (  t f ), like how [a] is isomorphic to   ( a). functor-combinators functor-combinators functor-combinators Instances of  * are monoids in the monoidal category on .This instance is the "proof" that "monads are the monoids in the category of endofunctors (enriched with )":Note that because of typeclass constraints, this requires   as well as  *. But, you can get a "local" instance of   for any   using st. functor-combinators5All functors are monoids in the monoidal category on . functor-combinators5All functors are monoids in the monoidal category on . functor-combinators Instances of ) are monoids in the monoidal category on . functor-combinators functor-combinators Instances of  8 are monoids in the monoidal category on contravariant .:Note that because of typeclass constraints, this requires z as well as  *. But, you can get a "local" instance of z for any   using su. functor-combinators Instances of  8 are monoids in the monoidal category on the covariant .:Note that because of typeclass constraints, this requires   as well as  *. But, you can get a "local" instance of   for any   using sv. functor-combinators Instances of * are monoids in the monoidal category on . functor-combinators Instances of * are monoids in the monoidal category on . functor-combinators functor-combinators Instances of ) are monoids in the monoidal category on . functor-combinators functor-combinators) ) (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:;s. This witnesses the fact that the former is isomorphic to f consed to the latter. functor-combinatorsA   t i f is a linked list of f s, and a   t f is a non-empty linked list of f$s. This witnesses the fact that a   t i f is either empty (i) or non-empty (  t f). functor-combinators$The "reverse" function representing  . Provided here as a separate function because it does not require   f. functor-combinators  ()  is the free "monoid in the monoidal category of endofunctors enriched by " --- aka, the free . functor-combinators  ()  is the free "monoid in the monoidal category of endofunctors enriched by " --- aka, the free . functor-combinators    is the free "monoid in the monoidal category of endofunctors enriched by " --- aka, the free  . functor-combinators   wx is the free "monoid in the monoidal category of endofunctors enriched by " --- aka, the free . functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators    is the free "monoid in the monoidal category of endofunctors enriched by contravariant " --- aka, the free  . functor-combinators functor-combinators    is the free "monoid in the monoidal category of endofunctors enriched by " --- aka, the free  . functor-combinators  t i is the "free   t i". However, we have to wrap t in   and i in  " to prevent overlapping instances. functor-combinatorsWe have to wrap t in  " to prevent overlapping instances. functor-combinators!We can collapse and interpret an   t i if we have   t. functor-combinators functor-combinators functor-combinators   is the free "semigroup in the semigroupoidal category of endofunctors enriched by " --- aka, the free . functor-combinators   is the free "semigroup in the semigroupoidal category of endofunctors enriched by " --- aka, the free z. functor-combinators   is the free "semigroup in the semigroupoidal category of endofunctors enriched by " --- aka, the free . functor-combinators  () is the free "semigroup in the semigroupoidal category of endofunctors enriched by " --- aka, the free . functor-combinators   is the free "semigroup in the semigroupoidal category of endofunctors enriched by " --- aka, the free  . functor-combinators   is the free "semigroup in the semigroupoidal category of endofunctors enriched by " --- aka, the free  . functor-combinators  t is the "free   t". However, we have to wrap t in  " to prevent overlapping instances. (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; to get the head and the rest of the items. Analogous to the   constructor. functor-combinatorsMatch on an "empty"  ; contains no f4s, but only the terminal value. Analogous to the   constructor. functor-combinatorsMatch on a non-empty  ; contains the splitting function, the two rejoining functions, the first f/, and the rest of the chain. Analogous to the   constructor. functor-combinators6In the covariant direction, we can interpret into any .In theory, this shouldn't never be necessary, because you should just be able to use  interpret, since any instance of  is also an instance of ?. However, this can be handy if you are using an instance of  that has no  instance. Consider also  unsafeInaltCo1 if you are using a specific, concrete type for g. functor-combinators:In the contravariant direction, we can interpret into any .In theory, this shouldn't never be necessary, because you should just be able to use  interpret, since any instance of  is also an instance of ?. However, this can be handy if you are using an instance of  that has no  instance. Consider also unsafeInaltContra0 if you are using a specific, concrete type for g. functor-combinators Extract the   part out of a  , shedding the covariant bits. functor-combinators Extract the   part out of a  , shedding the covariant bits. functor-combinators6In the covariant direction, we can interpret into any .In theory, this shouldn't never be necessary, because you should just be able to use  interpret, since any instance of  is also an instance of ?. However, this can be handy if you are using an instance of  that has no  instance. Consider also unsafeInplusCo1 if you are using a specific, concrete type for g. functor-combinators:In the contravariant direction, we can interpret into any .In theory, this shouldn't never be necessary, because you should just be able to use  interpret, since any instance of  is also an instance of ?. However, this can be handy if you are using an instance of  that has no  instance. Consider also unsafeInplusContra0 if you are using a specific, concrete type for g. functor-combinators Extract the  part out of a  #, shedding the contravariant bits. functor-combinators Extract the  part out of a  #, shedding the contravariant bits. This version does not require a   constraint because it converts to the coyoneda-wrapped product, which is more accurately the true conversion to a covariant chain. functor-combinators Extract the  part out of a  #, shedding the contravariant bits. functor-combinators Extract the  part out of a  #, shedding the contravariant bits. This version does not require a   constraint because it converts to the coyoneda-wrapped product, which is more accurately the true conversion to a covariant chain. functor-combinatorsGeneral-purpose folder of  *. Provide a way to handle the identity (empty ) and a way to handle a cons (). functor-combinatorsGeneral-purpose folder of  . Provide a way to handle the individual leaves and a way to handle a cons (). functor-combinators!Convenient wrapper to build up a   on by providing each branch of it. This makes it much easier to build up longer chains because you would only need to write the splitting/joining functions in one place.#For example, if you had a data type .data MyType = MTI Int | MTB Bool | MTS String and an invariant functor Prim4 (representing, say, a bidirectional parser, where Prim Int" is a bidirectional parser for an 9), then you could assemble a bidirectional parser for a MyType@ using: invmap (case MTI x -> Z (I x); MTB y -> S (Z (I y)); MTS z -> S (S (Z (I z)))) (case Z (I x) -> MTI x; S (Z (I y)) -> MTB y; S (S (Z (I z))) -> MTS z) $ assembleDecAlt $ intPrim :* boolPrim :* stringPrim :* Nil Some notes on usefulness depending on how many components you have:If you have 0 components, use   directly.If you have 1 component, use  or   directly.If you have 2 components, use   or  .If you have 3 or more components, these combinators may be useful; otherwise you'd need to manually peel off eithers one-by-one.If each component is itself a   f (instead of f), you can use  concatInplus. functor-combinators A version of   but for   instead. Can be useful if you intend on interpreting it into something with only a  or  instance, but no ey or  or z{.If each component is itself a   f (instead of f), you can use  concatInalt.  (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; to get the head and the rest of the items. Analogous to the   constructor.Note that the order of the first two arguments has swapped as of v0.4.0.0 functor-combinatorsMatch on an "empty"  ; contains no f/s, but only the terminal value. Analogous to . functor-combinatorsMatch on a non-empty  ; contains no f3s, but only the terminal value. Analogous to the   constructor.Note that the order of the first two arguments has swapped as of v0.4.0.0 functor-combinators6In the covariant direction, we can interpret into any  .In theory, this shouldn't never be necessary, because you should just be able to use , since any instance of   is also an instance of ?. However, this can be handy if you are using an instance of   that has no  instance. Consider also  unsafeInplyCo1 if you are using a specific, concrete type for g. functor-combinators:In the contravariant direction, we can interpret into any z.In theory, this shouldn't never be necessary, because you should just be able to use , since any instance of z is also an instance of ?. However, this can be handy if you are using an instance of z that has no  instance. Consider also unsafeInplyContra0 if you are using a specific, concrete type for g. functor-combinators6In the covariant direction, we can interpret into any  .In theory, this shouldn't never be necessary, because you should just be able to use , since any instance of   is also an instance of ?. However, this can be handy if you are using an instance of   that has no  instance. Consider also unsafeInplicativeCo1 if you are using a specific, concrete type for g. functor-combinators6In the covariant direction, we can interpret into any  .In theory, this shouldn't never be necessary, because you should just be able to use , since any instance of   is also an instance of ?. However, this can be handy if you are using an instance of   that has no  instance. Consider also unsafeInplicativeContra1 if you are using a specific, concrete type for g. functor-combinatorsGeneral-purpose folder of  *. Provide a way to handle the identity (   ) and a way to handle a cons (  ). functor-combinatorsGeneral-purpose folder of  . Provide a way to handle the individual leaves and a way to handle a cons ('liftF2{ ). functor-combinators Extract the   part out of a  #, shedding the contravariant bits. functor-combinators Extract the   part out of a  #, shedding the contravariant bits. functor-combinators Extract the   part out of a  , shedding the covariant bits. functor-combinators Extract the   part out of a  , shedding the covariant bits. functor-combinators!Convenient wrapper to build up a   by providing each component of it. This makes it much easier to build up longer chains because you would only need to write the splitting/joining functions in one place.#For example, if you had a data type !data MyType = MT Int Bool String and an invariant functor Prim4 (representing, say, a bidirectional parser, where Prim Int" is a bidirectional parser for an 9), then you could assemble a bidirectional parser for a MyType@ using: invmap ((MyType x y z) -> I x :* I y :* I z :* Nil) ((I x :* I y :* I z :* Nil) -> MyType x y z) $ assembleDivAp $ intPrim :* boolPrim :* stringPrim :* Nil Some notes on usefulness depending on how many components you have:If you have 0 components, use   directly.If you have 1 component, use  or   directly.If you have 2 components, use   or  .If you have 3 or more components, these combinators may be useful; otherwise you'd need to manually peel off tuples one-by-one.If each component is itself a   f (instead of f), you can use concatInplicative. functor-combinators A version of   but for   instead. Can be useful if you intend on interpreting it into something with only a z or   instance, but no   or  .If each component is itself a   f (instead of f), you can use  concatInply. functor-combinators A version of   using  from vinyl instead of  from sop-core. This can be more convenient because it doesn't require manual unwrapping/wrapping of components. data MyType = MT Int Bool String invmap ((MyType x y z) -> x ::& y ::& z ::& RNil) ((x ::& y ::& z ::& RNil) -> MyType x y z) $ assembleDivApRec $ intPrim :& boolPrim :& stringPrim :& Nil If each component is itself a   f (instead of f), you can use concatDivApRec. functor-combinators A version of   using  from vinyl instead of  from sop-core. This can be more convenient because it doesn't require manual unwrapping/wrapping of components.If each component is itself a   f (instead of f), you can use concatDivAp1Rec. functor-combinatorsA free  functor-combinatorsA free  functor-combinators The free  functor-combinators The free   (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:;     f a 8When you want to eventually interpret out the data, use:  :: (f  g) ->   c f a -> g a  Essentially,   c is the "free c".     is the free  , etc.  can theoretically replace  ,  , , , , ", no, , and other instances of  , if you don't care about being able to pattern match on explicit structure.However, it cannot replace / instances that are not free structures, like |, }, ~, etc.*Note that this doesn't have instances for all the typeclasses you could lift things into; you probably have to define your own if you want to use   c as an instance of c (using  ,  ,   for help). functor-combinatorsLift an action into a  . functor-combinatorsMap the action in a  . functor-combinators Merge two   actions. functor-combinators!Re-interpret the context under a  . functor-combinatorsFinalize an  instance.  toFinal ::  f      f toFinal ::   f      f toFinal ::  f     f toFinal :: " f      f toFinal ::  f     f toFinal ::  f     f Note that the instance of c for   c must be defined.This operation can potentially forget structure in t. For example, we have:   :: } f ~>    f 8In this process, we lose the "positional" structure of }.In the case where   doesn't lose any information, this will form an isomorphism with  , and t is known as the "Free c". For such a situation, t will have a   instance. functor-combinators Concretize a  .  fromFinal ::     f   f fromFinal ::     f    f fromFinal ::    f   f fromFinal ::     f  " f fromFinal ::    f   f fromFinal ::    f   f This can be useful because   doesn't have a concrete structure that you can pattern match on and inspect, but t might.0In the case that this forms an isomorphism with  , the t will have an instance of  . functor-combinators=The isomorphism between a free structure and its encoding as  . functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinatorsThis could also be     if    ~ . However, there isn't really a way to express this at the moment. functor-combinatorsThis could also be   z if    ~ . However, there isn't really a way to express this at the moment. functor-combinators  (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; Z (I x); MTB y -> S (Z (I y)); MTS z -> S (S (Z (I z)))) $ concludeN $ intBuilder :* boolBuilder :* stringBuilder :* Nil Some notes on usefulness depending on how many components you have:If you have 0 components, use .If you have 1 component, use  directly.If you have 2 components, use  directly.If you have 3 or more components, these combinators may be useful; otherwise you'd need to manually peel off eithers one-by-one. functor-combinators A version of   that works for non-empty /, and so only requires a  constraint.  %&"p~ p   "   %&%  ~ (c) Justin Le 2019BSD3 justin@jle.im experimental non-portable Safe-Inferred,!"()*/0125689:; as: not only each individual part, but a way to "re-embed" that individual part into overal a.So, you can imagine Dec (  a f) b as a collection of f x that consumes b and produces a.When a and b are the same, Dec (  a f) a> is like the free invariant sequencer. That is, in a sense, Dec (  a f) a contains both contravariant and covariant sequences side-by-side,  consuming a s and also  producing as.#You can build up these values with  *, and then use whatever typeclasses your t) normally supports to build it up, like  (for Div). You can then interpret it into both its contravariant and covariant contexts: 0-- interpret the covariant part runCovariant ::  g => (f ~> g) -> Div (Post a f) a -> g a runCovariant f = interpret (f . getPost) -- interpret the contravariant part runContravariant ::  g => (f ~> g) -> Div (Post a f) a -> g a runContravariant = preDivisible The   type wraps up Dec (  a f) a into a type   Dec f a, with nice instances/helpers.An example of a usage of this in the real world is a possible implementation of the unjson library's sum type constructor, to implement bidrectional serializers for sum types. functor-combinatorsA useful helper type to use with a covariant functor combinator that allows you to tag along contravariant access to all fs inside the combinator.)Maybe most usefully, it can be used with Ap. Remember that Ap f a is a collection of f x3s, with each x existentially wrapped. Now, for a Ap (Pre a f) a, it will be a collection of f x and a -> xs: not only each individual part, but a way to "select" that individual part from the overal a.So, you can imagine Ap (  a f) b as a collection of f x that consumes a and produces b.When a and b are the same, Ap (  a f) a> is like the free invariant sequencer. That is, in a sense, Ap (  a f) a contains both contravariant and covariant sequences side-by-side,  consuming a s and also  producing as.#You can build up these values with  *, and then use whatever typeclasses your t) normally supports to build it up, like   (for Ap). You can then interpret it into both its contravariant and covariant contexts: 0-- interpret the covariant part runCovariant ::   g => (f ~> g) -> Ap (Pre a f) a -> g a runCovariant f = interpret (f . getPre) -- interpret the contravariant part runContravariant ::   g => (f ~> g) -> Ap (Pre a f) a -> g a runContravariant = preDivisible The   type wraps up Ap (  a f) a into a type   Ap f a, with nice instances/helpers.7An example of a usage of this in the real world is the unjson library's record type constructor, to implement bidrectional serializers for product types. functor-combinatorsRun a   t into a contravariant   context. To run it in t s normal covariant context, use .This will work for types where there are a possibly-empty collection of fs, like: 1preDivisibleT :: Divisible g => (f ~> g) -> PreT Ap< f ~> g preDivisibleT :: Divisible g => (f ~> g) -> PreT ListF f ~> g functor-combinatorsRun a   t into a contravariant z context. To run it in t s normal covariant context, use .This will work for types where there is a non-empty collection of fs, like: +preDiviseT :: Divise g => (f ~> g) -> PreT Ap19 f ~> g preDiviseT :: Divise g => (f ~> g) -> PreT  NonEmptyF f ~> g functor-combinatorsRun a   t into a . To run it in t s normal covariant context, use .4This will work for types where there is exactly one f inside: 9preContravariantT :: Contravariant g => (f ~> g) -> PreT Step f ~> g preContravariantT :: Contravariant g => (f ~> g) -> PreT Coyoneda f ~> g functor-combinatorsRun a "pre-routed" t into a contravariant   context. To run it in t s normal covariant context, use  with  .This will work for types where there are a possibly-empty collection of fs, like: +preDivisible :: Divisible g => (f ~> g) -> Ap ( : a f) b -> g a preDivisible :: Divisible g => (f ~> g) -> ListF (  a f) b -> g a functor-combinatorsRun a "pre-routed" t into a contravariant z context. To run it in t s normal covariant context, use  with  .This will work for types where there are is a non-empty collection of fs, like: %preDivise :: Divise g => (f ~> g) -> Ap1 ( 4 a f) b -> g a preDivise :: Divise g => (f ~> g) ->  NonEmptyF (  a f) b -> g a functor-combinatorsRun a "pre-routed" t into a . To run it in t!s normal covariant context, use  with  .4This will work for types where there is exactly one f inside: 3preContravariant :: Contravariant g => (f ~> g) -> Step (  a f) b -> g a preContravariant :: Contravariant g => (f ~> g) -> Coyoneda (  a f) b -> g a functor-combinatorsRun a   t into a covariant  context. To run it in t$s normal contravariant context, use .This will work for types where there are a possibly-empty collection of fs, like: (postPlusT :: Plus g => (f ~> g) -> PreT Dec0 f ~> g postPlusT :: Plus g => (f ~> g) -> PreT Div f ~> g functor-combinatorsRun a   t into a covariant  context. To run it in t$s normal contravariant context, use .This will work for types where there is a non-empty collection of fs, like: &postAltT :: Alt g => (f ~> g) -> PreT Dec1. f ~> g postAltT :: Alt g => (f ~> g) -> PreT Div1 f ~> g functor-combinatorsRun a   t into a covariant   context. To run it in t$s normal contravariant context, use .4This will work for types where there is exactly one f inside: .postFunctorT :: Functor g => (f ~> g) -> PreT Step6 f ~> g postFunctorT :: Functor g => (f ~> g) -> PreT  f ~> g functor-combinatorsRun a "post-routed" t into a covariant  context. To run it in t$s normal contravariant context, use .This will work for types where there are a possibly-empty collection of fs, like: "postPlus :: Plus g => (f ~> g) -> Dec7 (Post a f) b -> g a postPlus :: Plus g => (f ~> g) -> Div (Post a f) b -> g a functor-combinatorsRun a "post-routed" t into a covariant  context. To run it in t$s normal contravariant context, use .This will work for types where there are is a non-empty collection of fs, like:  postAlt :: Alt g => (f ~> g) -> Dec15 (Post a f) b -> g a postAlt :: Alt g => (f ~> g) -> Div1 (Post a f) b -> g a functor-combinatorsRun a "post-routed" t into a covariant   context. To run it in t$s normal contravariant context, use .4This will work for types where there is exactly one f inside: (postFunctor :: Functor g => (f ~> g) -> Step (Post a f) b -> g a postFunctor :: Functor g => (f ~> g) ->  (Post a f) b -> g a functor-combinatorsContravariantly retract the f out of a  , applying the pre-routing function. Not usually that useful because  % is meant to be used with covariant  s. functor-combinators Interpret a   into a contravariant context, applying the pre-routing function. functor-combinatorsDrop the pre-routing function and just give the original wrapped value. functor-combinators(Pre-compose on the pre-routing function. functor-combinatorsLike 5, but allowing you to provide a pre-routing function. functor-combinatorsCovariantly retract the f out of a  , applying the post-routing function. Not usually that useful because  ) is meant to be used with contravariant  s. functor-combinators Interpret a  ? into a covariant context, applying the post-routing function. functor-combinatorsDrop the post-routing function and just give the original wrapped value. functor-combinators*Post-compose on the post-routing function. functor-combinatorsLike 6, but allowing you to provide a post-routing function. functor-combinators"This instance is over-contrained (a only needs to be uninhabited), but there is no commonly used "uninhabited" typeclass functor-combinators"This instance is over-contrained (a only needs to be uninhabited), but there is no commonly used "uninhabited" typeclass functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators functor-combinators  4 4010189898^Y<Y<4444m$$mg||}}66                                                                                                                                                                                                                 v t   u                                                                                                                              ????????'??C?@!7()"         O   LN  KM                                                                                                                    X X X X X X X X X X X X XqX X XcX X X X X X X X X X X X X                                                                       ]]                       [                                                                 j jbjjjjj j j j j j j j j j j j j                                                                              d                                                                                                                                                                                                                                                           DefeeeyJHG./=><{ee.???no???????????aXXXX<^_H2functor-combinators-0.4.1.2-6f83RuY9ReR1ECoC76WHzJData.Functor.CombinatorControl.Natural.IsoFControl.Monad.Freer.Church!Data.Functor.Contravariant.Divise!Data.Functor.Contravariant.Decide#Data.Functor.Contravariant.ConcludeControl.Applicative.StepControl.Applicative.ListF Data.Functor.Contravariant.Night"Data.Functor.Invariant.InplicativeData.Functor.Combinator.Unsafe"Data.Functor.Invariant.InternativeData.Functor.Invariant.NightData.HBifunctor Data.HFunctorData.HFunctor.InterpretData.HFunctor.HTraversable'Data.Functor.Invariant.Internative.Free'Data.Functor.Invariant.Inplicative.FreeData.HFunctor.Chain)Data.Functor.Contravariant.Divisible.FreeData.Functor.Apply.FreeData.HBifunctor.AssociativeData.HBifunctor.TensorData.HFunctor.FinalData.HFunctor.RouteData.Functor.Tensor HBifunctorMonoidalData.Functor.ComposeComposeData.Functor.HFunctorinject interpretControl.Monad.FreeFreeControl.Monad.Free.ChurchFHFunctor Interpretretract splittingSFSFMFsplitSFData.Functor.PlusPlusControl.Comonad.Trans.EnvEnvTMMapData.Functor.TheseTheseTNEMapFHLiftControl.Monad.Trans.Identity IdentityTControl.COmonad.Trans.Env Data.FunctorDay Data.ProxyProxyData.HFunctor.InternalInjectControl.Monad.MorphMFunctor generalizeBindMMonadData.SemigroupAnySumNumeric.NaturalNaturalhfoldMap hfoldMap1htoList htoNonEmpty htraverseControl.Monad.Fail MonadFail Control.Monad MonadPlusData.Bifunctors.JokerJoker Data.TaggedTaggedData.HFunctor.Chain.InternalData.Functor.DayData.Functor.Bind AssociativeData.Functor.ApplyAp1Control.Applicative.FreePureData.List.NonEmptyNonEmptyListByChain1unrollNE$Data.Functor.Contravariant.Divisible DivisibleConcludeData.Map Data.MonoidData.HBifunctor.Tensor.Internal Data.ListunconsCompData.Functor.IdentityIdentitynonEmptyChainunrollLBData.Functor.Combinators.Unsafe unsafeBind unsafeDivise unsafeApplyNRefutec DecidableControl.Applicative AlternativeStepStepsControl.Applicative.Backwards BackwardsCCYCoyonedabase GHC.GenericsV1:+::*:R1L1$comonad-5.0.8-DcIGwJ56Veo5wx2LipBnJttransformers-0.5.6.2 runIdentityT"free-5.1.10-3xMTOQ2YZTO8K02P897Vv8ApControl.Alternative.FreeAlt+kan-extensions-5.2.5-3NS3Ya6ZRzoEhSl9WOsaRGData.Functor.Coyoneda#mmorph-1.2.0-2QS7EC8bAGz8JRqyuvM0sbControl.Monad.Trans.Compose getComposeTComposeTControl.Monad.Trans.ReaderReaderT runReaderT1natural-transformation-0.4-AxzbubLDQWs7pMIjH5xlmwControl.Natural~>$these-1.1.1.1-3GmQvGWDVR77oJEgTeukbpThese1That1This1Control.Applicative.LiftLift:>>=Free1runFree1runFreeunCompMoreF1DoneF1reFreeliftFree interpretFree retractFree hoistFree foldFree' foldFreeCfoldFreereFree1toFree hoistFree1 free1Comp liftFree1 retractFree1interpretFree1 matchFree1 foldFree1' foldFree1C foldFree1comp $fReadFree $fRead1Free $fShowFree $fShow1Free $fOrdFree$fEqFree $fOrd1Free $fEq1Free$fTraversableFree$fFoldableFree$fMonadFreefFree $fMonadFree $fBindFree $fPointedFree$fApplicativeFree $fApplyFree$fInvariantFree $fFunctorFree $fReadFree1 $fRead1Free1 $fShowFree1 $fShow1Free1 $fOrdFree1 $fEqFree1 $fOrd1Free1 $fEq1Free1$fTraversable1Free1$fFoldable1Free1$fTraversableFree1$fFoldableFree1 $fBindFree1 $fApplyFree1$fInvariantFree1$fFunctorFree1 $fOrdComp$fEqComp $fOrd1Comp $fEq1Comp $fReadComp $fRead1Comp $fShowComp $fShow1Comp $fPlusComp $fAltComp$fAlternativeComp$fTraversableComp$fFoldableComp$fApplicativeComp $fApplyComp$fInvariantComp $fFunctorComp<~>isoFcoercedFviewFreviewFoverFfromFWrappedDivisible WrapDivisibleunwrapDivisibleDivisedivisedivised<:>dsum1$fGenericWrappedDivisible$fEqWrappedDivisible$fShowWrappedDivisible$fOrdWrappedDivisible$fReadWrappedDivisible$fFunctorWrappedDivisible$fFoldableWrappedDivisible$fTraversableWrappedDivisible$fDivisibleWrappedDivisible$fContravariantWrappedDivisible$fShow1WrappedDivisible$fRead1WrappedDivisible$fEq1WrappedDivisible$fDiviseReverse$fDiviseProduct$fDiviseCompose$fDiviseWriterT$fDiviseWriterT0$fDiviseStateT$fDiviseStateT0 $fDiviseRWST $fDiviseRWST0$fDiviseReaderT$fDiviseMaybeT $fDiviseListT$fDiviseIdentityT$fDiviseExceptT$fDiviseErrorT$fDiviseBackwards $fDivise:.: $fDivise:*: $fDiviseM1 $fDiviseRec1 $fDiviseV1 $fDiviseU1 $fDiviseAlt$fDiviseSettableStateVar $fDiviseProxy$fDivisePredicate$fDiviseEquivalence$fDiviseComparison$fDiviseConstant $fDiviseConst $fDiviseOp$fDiviseWrappedDivisible$fInvariantWrappedDivisible$fOrd1WrappedDivisibleDecidedecidedecided$fDecideSettableStateVar $fDecideProxy$fDecideReverse$fDecideProduct$fDecideCompose$fDecideWriterT$fDecideWriterT0$fDecideStateT$fDecideStateT0$fDecideMaybeT $fDecideListT $fDecideRWST $fDecideRWST0$fDecideReaderT$fDecideIdentityT$fDecideBackwards $fDecide:.: $fDecide:*: $fDecideM1 $fDecideRec1 $fDecideV1 $fDecideU1 $fDecideAlt $fDecideOp$fDecidePredicate$fDecideEquivalence$fDecideComparison$fDecideWrappedDivisibleconclude concluded$fConcludeReverse$fConcludeProduct$fConcludeCompose$fConcludeWriterT$fConcludeWriterT0$fConcludeStateT$fConcludeStateT0$fConcludeMaybeT$fConcludeListT$fConcludeRWST$fConcludeRWST0$fConcludeReaderT$fConcludeIdentityT$fConcludeBackwards $fConclude:.: $fConclude:*: $fConcludeM1$fConcludeRec1 $fConcludeU1 $fConcludeAlt$fConcludeSettableStateVar$fConcludeProxy $fConcludeOp$fConcludePredicate$fConcludeEquivalence$fConcludeComparison$fConcludeWrappedDivisiblestepPosstepVal $fShowStep $fReadStep$fEqStep $fOrdStep $fFunctorStep$fFoldableStep$fTraversableStep $fGenericStep $fDataStep $fShow1Step $fRead1Step $fEq1StepgetStepssteppingstepDownstepUpabsurd1$fTraversable1Step$fFoldable1Step $fPointedStep$fInvariantStep$fDecidableStep$fConcludeStep $fDecideStep $fDiviseStep$fDivisibleStep$fContravariantStep$fApplicativeStep $fApplyStep $fOrd1Step $fShowSteps $fReadSteps $fEqSteps $fOrdSteps$fFunctorSteps$fFoldableSteps$fTraversableSteps$fGenericSteps $fDataSteps $fShow1Steps $fRead1Steps $fEq1StepsFlagged flaggedFlag flaggedVal steppings stepsDownstepsUp$fPointedSteps $fAltSteps$fInvariantSteps$fContravariantSteps$fSemigroupSteps$fTraversable1Steps$fFoldable1Steps $fOrd1Steps $fShowFlagged $fReadFlagged $fEqFlagged $fOrdFlagged$fFunctorFlagged$fFoldableFlagged$fTraversableFlagged$fGenericFlagged $fDataFlagged$fShow1Flagged$fRead1Flagged $fEq1FlaggedVoid2$fTraversable1Flagged$fFoldable1Flagged$fPointedFlagged$fApplicativeFlagged $fOrd1Flagged $fShowVoid2 $fReadVoid2 $fEqVoid2 $fOrdVoid2$fFunctorVoid2$fFoldableVoid2$fTraversableVoid2$fGenericVoid2 $fDataVoid2 $fShow1Void2 $fRead1Void2 $fEq1Void2Void3absurd2$fInvariantVoid2$fContravariantVoid2 $fApplyVoid2 $fBindVoid2 $fAltVoid2$fSemigroupVoid2 $fOrd1Void2 $fShowVoid3 $fReadVoid3 $fEqVoid3 $fOrdVoid3$fFunctorVoid3$fFoldableVoid3$fTraversableVoid3$fGenericVoid3 $fDataVoid3 $fShow1Void3 $fRead1Void3 $fEq1Void3absurd3$fInvariantVoid3$fContravariantVoid3 $fApplyVoid3 $fBindVoid3 $fAltVoid3$fSemigroupVoid3 $fOrd1Void3ListFrunListF $fShowListF $fReadListF $fEqListF $fOrdListF$fFunctorListF$fFoldableListF$fTraversableListF$fGenericListF $fDataListF $fShow1ListF $fRead1ListF $fEq1ListF NonEmptyF runNonEmptyFmapListF$fDecidableListF$fConcludeListF $fDecideListF$fDivisibleListF $fDiviseListF$fInvariantListF$fContravariantListF$fPointedListF $fMonoidListF$fSemigroupListF$fAlternativeListF $fPlusListF $fAltListF$fApplicativeListF $fApplyListF $fOrd1ListF$fShowNonEmptyF$fReadNonEmptyF $fEqNonEmptyF$fOrdNonEmptyF$fFunctorNonEmptyF$fFoldableNonEmptyF$fTraversableNonEmptyF$fGenericNonEmptyF$fDataNonEmptyF$fShow1NonEmptyF$fRead1NonEmptyF$fEq1NonEmptyFMaybeF runMaybeF ProdNonEmpty nonEmptyProd mapNonEmptyFtoListF fromListF$fPointedNonEmptyF$fSemigroupNonEmptyF$fDecideNonEmptyF$fDiviseNonEmptyF$fInvariantNonEmptyF$fContravariantNonEmptyF$fAltNonEmptyF$fApplicativeNonEmptyF$fOrd1NonEmptyF $fShowMaybeF $fReadMaybeF $fEqMaybeF $fOrdMaybeF$fFunctorMaybeF$fFoldableMaybeF$fTraversableMaybeF$fGenericMaybeF $fDataMaybeF $fShow1MaybeF $fRead1MaybeF $fEq1MaybeFMapFrunMapF mapMaybeF maybeToListF listToMaybeF$fPointedMaybeF$fMonoidMaybeF$fSemigroupMaybeF$fDecidableMaybeF$fConcludeMaybeF$fDecideMaybeF$fDivisibleMaybeF$fDiviseMaybeF$fInvariantMaybeF$fContravariantMaybeF$fAlternativeMaybeF $fPlusMaybeF $fAltMaybeF$fApplicativeMaybeF $fOrd1MaybeF $fShowMapF $fReadMapF$fEqMapF $fOrdMapF $fFunctorMapF$fFoldableMapF$fTraversableMapF $fGenericMapF $fDataMapF $fShow1MapF $fEq1MapF runNEMapF $fPointedMapF $fPlusMapF $fAltMapF $fMonoidMapF$fSemigroupMapF $fRead1MapF $fOrd1MapF $fShowNEMapF $fReadNEMapF $fEqNEMapF $fOrdNEMapF$fFunctorNEMapF$fFoldableNEMapF$fTraversableNEMapF$fGenericNEMapF $fDataNEMapF $fShow1NEMapF $fEq1NEMapF$fPointedNEMapF $fAltNEMapF$fSemigroupNEMapF$fTraversable1NEMapF$fFoldable1NEMapF $fRead1NEMapF $fOrd1NEMapFNotrefuteNightnightrunNightnecideassocunassocswappedtrans1trans2refutedintro1intro2elim1elim2$fInvariantNight$fContravariantNight$fSemigroupNot$fInvariantNot$fContravariantNotWrappedApplicativeOnlyWrapApplicativeOnlyunwrapApplicativeOnly InplicativeknotInplygathergatheredrunDaydather$fInplyWrappedDivisible$fInplyWrappedContravariant$fInplyWrappedFunctor$fInplicativeWrappedDivisible!$fInplicativeWrappedContravariant$fInplicativeWrappedFunctor$fGenericWrappedApplicativeOnly$fEqWrappedApplicativeOnly$fShowWrappedApplicativeOnly$fOrdWrappedApplicativeOnly$fReadWrappedApplicativeOnly$fFunctorWrappedApplicativeOnly $fFoldableWrappedApplicativeOnly#$fTraversableWrappedApplicativeOnly#$fApplicativeWrappedApplicativeOnly$fMonadWrappedApplicativeOnly$fShow1WrappedApplicativeOnly$fRead1WrappedApplicativeOnly$fEq1WrappedApplicativeOnlyWrappedDivisibleOnlyWrapDivisibleOnlyunwrapDivisibleOnly#$fInplicativeWrappedApplicativeOnly$fInplyWrappedApplicativeOnly$fApplyWrappedApplicativeOnly!$fInvariantWrappedApplicativeOnly$fOrd1WrappedApplicativeOnly$fGenericWrappedDivisibleOnly$fEqWrappedDivisibleOnly$fShowWrappedDivisibleOnly$fOrdWrappedDivisibleOnly$fReadWrappedDivisibleOnly$fFunctorWrappedDivisibleOnly$fFoldableWrappedDivisibleOnly!$fTraversableWrappedDivisibleOnly$fDivisibleWrappedDivisibleOnly#$fContravariantWrappedDivisibleOnly$fShow1WrappedDivisibleOnly$fRead1WrappedDivisibleOnly$fEq1WrappedDivisibleOnly gatheredN gatheredNMap gatheredN1 gatheredN1Map gatheredNRecgatheredNMapRecgatherN gatheredN1RecgatheredN1MapRecgatherN1 runDayApply runDayDivise$fInplicativeLift $fInplyLift$fInplicativeBackwards$fInplyBackwards$fInplicativeReverse$fInplyReverse$fInplicativeIdentityT$fInplyIdentityT$fInplicativeAlt $fInplyAlt$fInplicativeRec1 $fInplyRec1$fInplicativeProduct$fInplyProduct$fInplicative:*: $fInply:*:$fInplicativeM1 $fInplyM1$fInplicativeListT $fInplyListT$fInplicativeErrorT $fInplyErrorT$fInplicativeExceptT$fInplyExceptT$fInplicativeReaderT$fInplyReaderT$fInplicativeWriterT$fInplyWriterT$fInplicativeWriterT0$fInplyWriterT0$fInplicativeMaybeT $fInplyMaybeT!$fInplicativeWrappedDivisibleOnly$fInplyWrappedDivisibleOnly$fDiviseWrappedDivisibleOnly$fInvariantWrappedDivisibleOnly$fOrd1WrappedDivisibleOnly$fInplicativeOp $fInplyOp$fInplicativeEquivalence$fInplyEquivalence$fInplicativeComparison$fInplyComparison$fInplicativePredicate$fInplyPredicate$fInplicativeSettableStateVar$fInplySettableStateVar$fInplicative(,) $fInply(,)$fInplicativeWrappedMonad$fInplyWrappedMonad$fInplicativeContT $fInplyContT$fInplicativeConstant$fInplyConstant$fInplicativeConst $fInplyConst$fInplyHashMap $fInplyMap $fInplyIntMap $fInplyV1$fInplicativeWrappedArrow$fInplyWrappedArrow $fInplyNESeq$fInplicativeSeq $fInplySeq$fInplicativeTree $fInplyTree$fInplicativeNonEmpty$fInplyNonEmpty$fInplicativeProduct0$fInplyProduct0$fInplicativeSum $fInplySum$fInplicativeDual $fInplyDual$fInplicativeLast $fInplyLast$fInplicativeFirst $fInplyFirst$fInplicativeZipList$fInplyZipList$fInplicativeLast0 $fInplyLast0$fInplicativeFirst0 $fInplyFirst0$fInplicativeMax $fInplyMax$fInplicativeMin $fInplyMin$fInplicativeComplex$fInplyComplex$fInplicativeK1 $fInplyK1$fInplicativeU1 $fInplyU1$fInplicativePar1 $fInplyPar1$fInplicativeIO $fInplyIO$fInplicativeEither $fInplyEither$fInplicativeMaybe $fInplyMaybe$fInplicativeFUN $fInplyFUN$fInplicative[] $fInply[]$fInplicativeProxy $fInplyProxy$fInplicativeIdentity$fInplyIdentity$fInplicativeTagged $fInplyTagged$fInplicativeStateT $fInplyStateT$fInplicativeStateT0$fInplyStateT0$fInplicativeRWST $fInplyRWST$fInplicativeRWST0 $fInplyRWST0 unsafePlus unsafePointedunsafeConcludeunsafeInvariantCounsafeInvariantContra unsafeInplyCounsafeInplyContraunsafeInplicativeCounsafeInplicativeContra$fPointedPointMe InternativeInplusrejectInaltswerveswervedswervedN swervedNMap swervedN1 swervedN1Map$fInaltBackwards$fInaltReverse$fInaltIdentityT $fInaltRec1$fInaltProduct $fInalt:*: $fInaltM1$fInaltWrappedDivisibleOnly$fInaltWrappedDivisible$fInaltWrappedContravariant$fInaltWrappedFunctor$fInplusBackwards$fInplusReverse$fInplusIdentityT $fInplusRec1$fInplusProduct $fInplus:*: $fInplusM1$fInplusWrappedDivisibleOnly$fInplusWrappedDivisible$fInplusWrappedContravariant$fInplusWrappedFunctor$fInternativeBackwards$fInternativeReverse$fInternativeIdentityT$fInternativeRec1$fInternativeProduct$fInternative:*:$fInternativeM1!$fInternativeWrappedDivisibleOnly$fInternativeWrappedDivisible!$fInternativeWrappedContravariant$fInternativeWrappedFunctor$fInternativeOp $fInplusOp $fInaltOp$fInternativeEquivalence$fInplusEquivalence$fInaltEquivalence$fInternativeComparison$fInplusComparison$fInaltComparison$fInternativePredicate$fInplusPredicate$fInaltPredicate$fInternativeSettableStateVar$fInplusSettableStateVar$fInaltSettableStateVar$fInternativeWrappedMonad$fInplusWrappedMonad$fInaltWrappedMonad$fInaltHashMap $fInaltNEMap $fInaltMap$fInaltNEIntMap $fInaltIntMap $fInaltV1$fInternativeWrappedArrow$fInplusWrappedArrow$fInaltWrappedArrow $fInaltNESeq$fInternativeSeq $fInplusSeq $fInaltSeq$fInaltNonEmpty$fInternativeLast $fInplusLast $fInaltLast$fInternativeFirst $fInplusFirst $fInaltFirst $fInaltLast0 $fInaltFirst0$fInternativeU1 $fInplusU1 $fInaltU1$fInternativeIO $fInplusIO $fInaltIO $fInaltEither$fInternativeMaybe $fInplusMaybe $fInaltMaybe$fInternative[] $fInplus[] $fInalt[]$fInternativeProxy $fInplusProxy $fInaltProxy runNightAltrunNightDecide toCoNight toCoNight_ toContraNightnerveWrappedHBifunctorWrapHBifunctorunwrapHBifunctorhlefthrighthbimaphmapabsorbProxyF overHFunctor $fShowProxyF $fReadProxyF $fEqProxyF $fOrdProxyF$fFunctorProxyF$fFoldableProxyF$fTraversableProxyF$fGenericProxyF $fDataProxyF $fShow1ProxyF $fRead1ProxyF $fEq1ProxyFConstF getConstF$fHFunctorkk1ProxyF$fInvariantProxyF$fDecidableProxyF$fConcludeProxyF$fDecideProxyF$fDiviseProxyF$fDivisibleProxyF$fContravariantProxyF $fOrd1ProxyF $fShowConstF $fReadConstF $fEqConstF $fOrdConstF$fFunctorConstF$fFoldableConstF$fTraversableConstF$fGenericConstF $fDataConstF $fShow1ConstF $fRead1ConstF $fEq1ConstFHBindhbindhjoinHFreeHReturnHJoinHPureHOther retractHLift foldHFree retractHFree injectMapinjectContramap$fHFunctorkk1ConstF$fInvariantConstF$fDiviseConstF$fDivisibleConstF$fContravariantConstF $fOrd1ConstF$fInvariantHLift$fContravariantHLift$fHFunctork1k1HLift $fOrd1HLift $fEq1HLift $fShow1HLift$fHFunctork1k1HFree $fShowHFree $fShow1HFree$fInvariantHFree$fContravariantHFree$fInjectkHFree$fInjectkHLift$fInjectTYPEComposeT$fInjectkConstF$fInjectkProxyF$fInjectkReverse$fInjectTYPEEnvT$fInjectTYPEReaderT$fInjectTYPEWrappedApplicative$fInjectkBackwards$fInjectTYPEMaybeApply$fInjectTYPELift$fInjectkIdentityT$fInjectTYPEAp$fInjectTYPEAp0$fInjectTYPEFree1$fInjectTYPEFree$fInjectTYPEAlt $fInjectkM1 $fInjectkSum $fInjectk:+:$fInjectTYPEProduct$fInjectTYPE:*: $fInjectk:.:$fInjectTYPEComp$fInjectTYPEThese1$fInjectkFlagged$fInjectkSteps $fInjectkStep $fInjectkMapF$fInjectkNEMapF$fInjectkMaybeF$fInjectkNonEmptyF$fInjectkListF$fInjectTYPEAp1$fInjectTYPECoyoneda$fInjectTYPECoyoneda0 $fHBindkHFree $fHBindkHLift$fHBindTYPEEnvT$fHBindkProxyF$fHBindkReverse$fHBindTYPEWrappedApplicative$fHBindkBackwards$fHBindTYPEMaybeApply$fHBindTYPELift$fHBindkIdentityT $fHBindTYPEAp$fHBindTYPEAp0$fHBindTYPEFree1$fHBindTYPEFree$fHBindTYPEAlt $fHBindkM1 $fHBindkSum $fHBindk:+:$fHBindTYPEProduct$fHBindTYPE:*:$fHBindTYPEThese1$fHBindkFlagged $fHBindkStep$fHBindkMaybeF$fHBindkNonEmptyF $fHBindkListF$fHBindTYPEAp1$fHBindTYPECoyoneda$fFunctorHLift$fFunctorHFree $fOrdHLift $fEqHLift $fReadHLift $fShowHLiftWrapHFunwrapHFAndCAltConst getAltConstforIigetgetIicollectcollectI icollect1 itraverseiapplyifanoutifanout1$fInterpretkHFreef$fInterpretkHLiftf$fInterpretTYPEComposeTf$fInterpretkReversef$fInterpretTYPEEnvTf$fInterpretTYPEReaderTf"$fInterpretTYPEWrappedApplicativef$fInterpretkBackwardsf$fInterpretTYPEMaybeApplyf$fInterpretTYPELiftf$fInterpretkIdentityTf$fInterpretTYPEApf$fInterpretTYPEApf0$fInterpretTYPEFree1f$fInterpretTYPEFreef$fInterpretkM1f$fInterpretTYPESumf$fInterpretTYPE:+:f$fInterpretTYPEProductf$fInterpretTYPE:*:f$fInterpretTYPEAltf$fInterpretTYPEThese1f$fInterpretkFlaggedf$fInterpretTYPEStepsf$fInterpretkStepf$fInterpretTYPENEMapFf$fInterpretTYPEMapFf$fInterpretTYPEMaybeFf$fInterpretTYPENonEmptyFf$fInterpretTYPEListFf$fInterpretTYPEApf1$fInterpretTYPECoyonedaf$fInterpretTYPECoyonedaf0$fConcludeAltConst$fDecideAltConst$fDivisibleAltConst$fDiviseAltConst$fPlusAltConst $fAltAltConst$fApplicativeAltConst$fApplyAltConst$fInvariantAltConst$fContravariantAltConst$fOrd1AltConst $fEq1AltConst$fShow1AltConst $fAndCkcda$fHBindkWrapHF$fInjectkWrapHF$fHFunctorkk1WrapHF $fOrd1WrapHF $fEq1WrapHF $fShow1WrapHF $fShowWrapHF $fReadWrapHF $fEqWrapHF $fOrdWrapHF$fFunctorWrapHF$fFoldableWrapHF$fTraversableWrapHF$fGenericWrapHF $fDataWrapHF$fShowAltConst $fEqAltConst $fOrdAltConst$fGenericAltConst$fFunctorAltConst$fFoldableAltConst$fTraversableAltConst$fDataAltConst HTraversable HTraversable1 htraverse1 hsequence1hfor1 hsequencehfor hmapDefault$fHTraversablek1k1HFree$fHTraversablek1k1HLift$fHTraversablekk1ConstF$fHTraversablekk1ProxyF$fHTraversablekk1Void3$fHTraversableTYPETYPEThese1$fHTraversablekk1Joker$fHTraversablek1k1Sum$fHTraversablek1k1Product$fHTraversablek1k1:+:$fHTraversablek1k1:*:$fHTraversableTYPETYPENight$fHTraversableTYPETYPEDay$fHTraversableTYPETYPEDay0$fHTraversablek[]NS$fHTraversablek[]NP$fHTraversablek[]CoRec$fHTraversablek[]Rec$fHTraversableTYPETYPEEnvT$fHTraversablekk1Void2$fHTraversablek1k1M1$fHTraversablek1k1:.:$fHTraversableTYPETYPEComposeT$fHTraversablek1k1Reverse$fHTraversablekTYPETagged($fHTraversableTYPETYPEWrappedApplicative$fHTraversablek1k1Backwards $fHTraversableTYPETYPEMaybeApply$fHTraversableTYPETYPELift$fHTraversablek1k1IdentityT$fHTraversableTYPETYPEAp$fHTraversableTYPETYPEAp0$fHTraversableTYPETYPEMaybeT$fHTraversablek1k1Flagged$fHTraversablek1k1Steps$fHTraversablek1k1Step$fHTraversableTYPETYPEAltF$fHTraversableTYPETYPEAlt$fHTraversablek1k1NEMapF$fHTraversablek1k1MapF$fHTraversablek1k1MaybeF$fHTraversablek1k1NonEmptyF$fHTraversablek1k1ListF$fHTraversableTYPETYPEAp1$fHTraversableTYPETYPECoyoneda$fHTraversableTYPETYPECoyoneda0$fHTraversable1k1k1HFree$fHTraversable1k1k1HLift$fHTraversable1k1k1Product$fHTraversable1k1k1:*:$fHTraversable1TYPETYPENight$fHTraversable1TYPETYPEDay$fHTraversable1TYPETYPEDay0$fHTraversable1k[]NS$fHTraversable1TYPETYPEEnvT$fHTraversable1kk1Void2$fHTraversable1k1k1M1$fHTraversable1k1k1:.:$fHTraversable1k1k1Reverse$fHTraversable1k1k1IdentityT$fHTraversable1TYPETYPEMaybeT$fHTraversable1k1k1Flagged$fHTraversable1k1k1Steps$fHTraversable1k1k1Step$fHTraversable1k1k1NEMapF$fHTraversable1k1k1NonEmptyF$fHTraversable1TYPETYPECoyoneda $fHTraversable1TYPETYPECoyoneda0LeftFrunLeftFoverHBifunctor $fShowLeftF $fReadLeftF $fEqLeftF $fOrdLeftF$fFunctorLeftF$fFoldableLeftF$fTraversableLeftF$fGenericLeftF $fDataLeftF $fShow1LeftF $fRead1LeftF $fEq1LeftF $fOrd1LeftF$fBifunctorLeftF$fBifoldableLeftFRightF runRightF$fHTraversablekk1LeftF$fHFunctorkk1LeftF$fHBifunctorkLeftF$fBiapplicativeLeftF$fBitraversableLeftF $fShowRightF $fReadRightF $fEqRightF $fOrdRightF$fFunctorRightF$fFoldableRightF$fTraversableRightF$fGenericRightF $fDataRightF $fShow1RightF $fRead1RightF $fEq1RightF$fInterpretkRightFf$fHBindkRightF$fHTraversablek1k1RightF$fInjectkRightF$fHFunctork1k1RightF$fHBifunctorkRightF $fOrd1RightFDecAltunDecAltDecAlt1DecAlt1_ unDecAlt1DivApunDivApDivAp1DivAp1_unDivAp1DoneMoreDone1More1 foldChain1 foldChain1A unfoldChain1toChain1 injectChain1 matchChain1 foldChain foldChainA unfoldChainsplittingChain unconsChainDec1DecLoseChooseDiv1unDiv1DivunDivDiv1_DivideConquerdivListFlistFDivhoistDivliftDivrunDivtoDiv hoistDiv1liftDiv1runDiv1 div1NonEmptyF nonEmptyFDiv1hoistDecliftDecrunDectoDec hoistDec1liftDec1runDec1$fInterpretTYPEDivf$fInvariantDiv$fHTraversableTYPETYPEDiv$fInterpretTYPEDiv1f$fInvariantDiv1$fHTraversable1TYPETYPEDiv1$fHTraversableTYPETYPEDiv1$fHTraversableTYPETYPEDec$fInterpretTYPEDecf$fInjectTYPEDec$fHFunctorTYPETYPEDec $fConcludeDec $fDecideDec$fInvariantDec$fContravariantDec$fHTraversable1TYPETYPEDec1$fHTraversableTYPETYPEDec1$fInterpretTYPEDec1f$fInjectTYPEDec1$fHFunctorTYPETYPEDec1 $fDecideDec1$fInvariantDec1$fContravariantDec1$fContravariantDiv1 $fDiviseDiv1$fHFunctorTYPETYPEDiv1$fInjectTYPEDiv1$fContravariantDiv $fDiviseDiv$fDivisibleDiv$fHFunctorTYPETYPEDiv$fInjectTYPEDiv $fInaltDec1 $fInplusDec $fInaltDec $fInplyDiv1$fInplicativeDiv $fInplyDivDayAp1ap1DaytoApfromApliftAp1 retractAp1runAp1$fInterpretTYPEAp1f$fHTraversable1TYPETYPEAp1$fHFunctorTYPETYPEAp1 $fApplyAp1$fInvariantAp1 $fFunctorAp1WrapNEunwrapNEWrapHBF unwrapHBF SemigroupIn biretract binterpret NonEmptyBy FunctorBy associatingappendNEmatchNEconsNE toNonEmptyBydisassoc retractNE interpretNE matchingNEbiget!$!!*!!+!biapply$fAssociativeRightF$fAssociativeLeftF$fAssociativeJoker$fAssociativeComp$fAssociativeVoid3$fAssociativeThese1$fAssociativeSum$fAssociative:+:$fAssociativeNight$fAssociativeNight0$fAssociativeDay$fAssociativeDay0$fAssociativeDay1$fAssociativeProduct$fAssociative:*:$fSemigroupInRightFf$fSemigroupInLeftFf$fSemigroupInJokerf$fSemigroupInCompf$fSemigroupInVoid3f$fSemigroupInThese1f$fSemigroupInSumf$fSemigroupIn:+:f$fSemigroupInNightf$fSemigroupInNightf0$fSemigroupInDayf$fSemigroupInDayf0$fSemigroupInDayf1$fSemigroupInProductf$fSemigroupIn:*:f$fAssociativeWrapHBF$fHBifunctorkWrapHBF $fOrd1WrapHBF $fEq1WrapHBF$fShow1WrapHBF$fSemigroupInWrapHBFWrapNE$fInvariantWrapNE$fContravariantWrapNE$fFunctorWrapNE $fShowWrapHBF $fReadWrapHBF $fEqWrapHBF $fOrdWrapHBF$fFunctorWrapHBF$fFoldableWrapHBF$fTraversableWrapHBF$fGenericWrapHBF $fDataWrapHBF$fHFunctorkkWrapHBFTensorappendLBsplitNE splittingLBtoListByfromNEnilLBconsLBunconsLB appendChainunrollrerollrerollNE splitChain1WrapLBunwrapLBWrapFunwrapF Matchable unsplitNEmatchLBMonoidInpureT rightIdentity leftIdentitysumLeftIdentitysumRightIdentityprodLeftIdentityprodRightIdentityprodOutLprodOutR retractLB interpretLBinLinRoutLoutR splittingNE matchingLB$fTensorCompIdentity$fTensorThese1V1 $fTensorSumV1 $fTensor:+:V1$fTensorNightNot$fTensorNightNot0$fTensorDayIdentity$fTensorDayProxy$fTensorDayIdentity0$fTensorProductProxy$fTensor:*:Proxy$fMonoidInCompIdentityf$fMonoidInThese1V1f$fMonoidInSumV1f$fMonoidIn:+:V1f$fMonoidInNightNotf$fMonoidInNightNotf0$fMonoidInDayIdentityf$fMonoidInDayProxyf$fMonoidInDayIdentityf0$fMonoidInProductProxyf$fMonoidIn:*:Proxyf$fMatchableSumV1$fMatchable:+:V1$fMatchableNightNot$fMatchableDayProxy$fMatchableDayIdentity$fMatchableProductProxy$fMatchable:*:Proxy$fMatchableNightNot0$fMatchableDayIdentity0$fTensorWrapHBFWrapF $fOrd1WrapF $fEq1WrapF $fShow1WrapF$fMonoidInWrapHBFWrapFWrapLB$fSemigroupInWrapHBFWrapLB$fInvariantWrapLB$fContravariantWrapLB$fFunctorWrapLB $fShowWrapF $fReadWrapF $fEqWrapF $fOrdWrapF$fFunctorWrapF$fFoldableWrapF$fTraversableWrapF$fGenericWrapF $fDataWrapF unrollingNE appendChain1toChain injectChain fromChain1 unrollingsplittingChain1 matchingChain unmatchChain $fPlusChain $fAltChain $fPlusChain0 $fAltChain0 $fMonadChain $fBindChain$fApplicativeChain $fApplyChain$fConcludeChain $fDecideChain $fInplusChain $fInaltChain$fInplicativeChain $fInplyChain$fDivisibleChain $fDiviseChain$fApplicativeChain0 $fApplyChain0$fMonoidInWrapHBFWrapFChain$fSemigroupInWrapHBFChain$fInterpretTYPEChainf $fInaltChain1$fInjectTYPEChain $fInplyChain1$fDecideChain1$fDiviseChain1 $fAltChain1 $fAltChain10 $fBindChain1 $fApplyChain1$fApplyChain10$fSemigroupInWrapHBFChain1$fInterpretTYPEChain1fRejectSwerve runCoDecAlt1runContraDecAlt1 decAltDec decAltDec1 runCoDecAltrunContraDecAlt decAltListF decAltListF_decAltNonEmptyFdecAltNonEmptyF_ foldDecAlt foldDecAlt1assembleDecAltassembleDecAlt1$fInaltDecAlt1$fInplusDecAlt $fInaltDecAltKnotGather runCoDivAp1runContraDivAp1 runCoDivAprunContraDivAp foldDivAp foldDivAp1divApApdivApAp1divApDiv divApDiv1 assembleDivApassembleDivAp1assembleDivApRecassembleDivAp1Rec$fInterpretTYPEDivApf$fInterpretTYPEDivAp1f $fInplyDivAp1$fInplicativeDivAp $fInplyDivApFreeOf FreeFunctorByfromFreeFinalrunFinal liftFinal0 liftFinal1 liftFinal2 hoistFinalCtoFinal fromFinal finalizing$fInterpretkFinalf$fInjectkFinal$fHFunctork1k1Final $fInplusFinal $fInaltFinal$fInplicativeFinal $fInplyFinal$fInvariantFinal$fInplusFinal0 $fInaltFinal0$fInvariantFinal0 $fInaltFinal1$fInvariantFinal1$fInplicativeFinal0 $fInplyFinal0$fInvariantFinal2 $fInplyFinal1$fInvariantFinal3$fInvariantFinal4$fDecidableFinal$fConcludeFinal $fDecideFinal$fDivisibleFinal$fContravariantFinal$fConcludeFinal0$fDecideFinal0$fContravariantFinal0$fDecideFinal1$fContravariantFinal1$fDivisibleFinal0 $fDiviseFinal$fContravariantFinal2$fDiviseFinal0$fContravariantFinal3$fContravariantFinal4 $fPlusFinal $fAltFinal$fFunctorFinal $fAltFinal0$fFunctorFinal0$fMonadReaderrFinal $fMonadFinal $fApplyFinal$fApplicativeFinal$fFunctorFinal1$fPointedFinal$fMonadPlusFinal$fAlternativeFinal $fPlusFinal0 $fAltFinal1 $fMonadFinal0$fApplicativeFinal0$fFunctorFinal2 $fMonadFinal1$fApplicativeFinal1 $fApplyFinal0$fFunctorFinal3$fAlternativeFinal0 $fPlusFinal1 $fAltFinal2$fApplicativeFinal2 $fApplyFinal1$fFunctorFinal4$fApplicativeFinal3 $fApplyFinal2$fFunctorFinal5 $fBindFinal $fApplyFinal3$fFunctorFinal6 $fApplyFinal4$fFunctorFinal7$fFunctorFinal8$fFreeOfUnconstrainedIdentityT$fFreeOfInplusDecAlt$fFreeOfInaltDecAlt1$fFreeOfInplicativeDivAp$fFreeOfInplyDivAp1$fFreeOfConcludeDec$fFreeOfDecideDec1$fFreeOfDivisibleDiv$fFreeOfDiviseDiv1$fFreeOfPlusListF$fFreeOfAltNonEmptyF$fFreeOfPointedMaybeApply$fFreeOfPointedLift$fFreeOfBindFree1$fFreeOfMonadFree$fFreeOfAlternativeAlt$fFreeOfApplicativeAp$fFreeOfApplyAp1$fFreeOfApplicativeAp0$fFreeOfContravariantCoyoneda$fFreeOfFunctorCoyonedadsum concludeNdecideNPostTunPostTPreTunPreTPost:<$>:Pre:>$<: preDivisibleT preDiviseTpreContravariantT preDivisible preDivisepreContravariant postPlusTpostAltT postFunctorTpostPluspostAlt postFunctor retractPre interpretPregetPremapPre injectPre retractPost interpretPostgetPostmapPost injectPost$fInterpretTYPEPref$fHBindTYPEPre$fInjectTYPEPre$fHTraversableTYPETYPEPre$fHFunctorTYPETYPEPre$fInvariantPre$fInterpretTYPEPostf$fHBindTYPEPost$fInjectTYPEPost$fHTraversableTYPETYPEPost$fHFunctorTYPETYPEPost$fInvariantPost$fContravariantPost$fInterpretTYPEPreTf$fHTraversableTYPETYPEPreT$fInjectTYPEPreT$fHFunctorTYPETYPEPreT$fInvariantPreT$fInterpretTYPEPostTf$fHTraversableTYPETYPEPostT$fInjectTYPEPostT$fHFunctorTYPETYPEPostT$fInvariantPostT $fAltProPre $fBindProPre$fProfunctorProPre$fInvariantProPost$fFunctorProPost$fProfunctorProPost $fFunctorPre $fOrdProPre $fEqProPre $fShowProPre$fMonoidProPre$fSemigroupProPre$fInternativeProPre$fInplusProPre $fInaltProPre$fInplicativeProPre $fInplyProPre$fInvariantProPre $fPlusProPre$fDecidableProPre$fConcludeProPre$fDecideProPre$fDiviseProPre$fDivisibleProPre$fContravariantProPre $fMonadProPre$fApplicativeProPre $fApplyProPre$fFunctorProPre GHC.MaybeMaybeghc-prim GHC.TypesIOBoolGHC.BaseFunctor Applicative:.:*semigroupoids-5.3.7-Dgk1ji0qsCkJoBMzsy6u03Data.Functor.Bind.ClassMonadreturn>>=GHC.ShowShowGHC.ReadReadControl.Monad.Free.Classwrap MonadFreepure.id*contravariant-1.5.5-596ADKsI2Mu9h4lPQxvtWTApplyconquerdivide<|>Data.Functor.Contravariant contramap SemigroupData.Semigroup.Internal Data.EitherEitherLeftRight Data.VoidVoid ghc-bignumGHC.Num.NaturalData.Functor.AltFalseTrue$pointed-5.0.4-F7JYSSzdsHK4qxRKSGt4BX Data.Pointedpoint GHC.Classes||<*> ContravariantStringJust<.>$invariant-0.6-Iq7A4Jzyhtk3OJR6odZCKpData.Functor.InvariantinvmapData.Functor.Invariant.DayInt'sop-core-0.5.0.2-8cmRYB37llUAjnR98I5kI0 Data.SOP.NPNP#vinyl-0.14.3-9KWyyXbnBAN5NWp1C4ORkcData.Vinyl.XRecXRecPointed Invariantemptychoose Data.SOP.NSNSlosezeroNDLsumSumprodProd$fHFunctork[]NS$fHFunctork[]NP$fHFunctorTYPETYPEMaybeT$fHFunctorTYPETYPEF$fHFunctorTYPETYPEAltF$fHFunctorTYPETYPECoyoneda$fHBifunctorTYPENight$fHBifunctorTYPEDay$fHBifunctorTYPEDay0 ndlSingletonfromNDLControl.Monad.Trans.Classlift MonadTransmemptyEqData.Functor.ConstConstMonoid#Data.Functor.Contravariant.CoyonedaOp mtl-2.2.2Control.Monad.Reader.Class MonadReaderData.Traversable Traversabletraversefmap Data.Semigroup.Traversable.Class Traversable1 traverse1$fInvariantChain1$fContravariantChain1$fInterpretTYPEDecAlt1f$fInterpretTYPEDecAltfData.Functor.Contravariant.Day:|GHC.Num+ Data.FoldablelengthCharData.Functor.SumData.Functor.ProductProduct Data.TupleuncurryliftA21trivial-constraint-0.7.0.0-9vGIaW5Ev7P5bTjEChrBYTData.Constraint.Trivial UnconstrainedProPostProPre