!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  (C) 2008-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundepsNonerPick a name for an operation. For normal constructors it lowers first letter. For infix ones it omits the first :.#Check if parameter is used in type.Analyze constructor argument.TApply transformation to the return value independently of how many parameters does e have. E.g.  mapRet Just (x y z -> x + y * z) goes to x y z -> Just (x + y * z)Unification of two types. next with  a -> next gives Maybe a return type  a -> next with  b -> next gives  Either a b return typeyUnifying a list of types (possibly refining expressions). Name is used when the return type is supposed to be arbitrary.<Provide free monadic actions for a single value constructor.4Provide free monadic actions for a type declaration.Get construstor name.)Generate monadic actions for a data type.@Generate monadic action for a single constructor of a data type.$( ''T)L provides free monadic actions for the constructors of the given data type T.Like , but does not provide type signatures. This can be used to attach Haddock comments to individual arguments for each generated function. data LangF x = Output String x makeFree_ 'LangF -- | Output a string. output :: MonadFree LangF m => String -- ^ String to output. -> m () -- ^ No result. 6 must be called *before* the explicit type signatures.$( 'Con)6 provides free monadic action for a data constructor Conx. Note that you can attach Haddock comment to the generated function by placing it before the top-level invocation of : *-- | Output a string. makeFreeCon 'Output Like n, but does not provide a type signature. This can be used to attach Haddock comments to individual arguments. data LangF x = Output String x makeFreeCon_ 'Output -- | Output a string. output :: MonadFree LangF m => String -- ^ String to output. -> m () -- ^ No result. 5 must be called *before* the explicit type signature.Include type signature?DInclude only mentioned constructor names. Use all constructors when Nothing.Data type declaration.Include type signature?DInclude only mentioned constructor names. Use all constructors when Nothing. Type name.Generated declarations.Include type signature?Constructor name.Generated declarations.(C) 2008-2015 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> experimentalnon-portable (fundeps, MPTCs) Safe-Inferred 12468=KMonads provide substitution () and renormalization (): m  f =  ( f m)A free o is one that does no work during the normalization step beyond simply grafting the two monadic values together.[] is not a free  (in this sense) because  [[a]] smashes the lists flat.On the other hand, consider: ,data Tree a = Bin (Tree a) (Tree a) | Tip a   instance  Tree where  = Tip Tip a  f = f a Bin l r  f = Bin (l  f) (r  f) This  is the free  of Pair: data Pair a = Pair a a !And we could make an instance of  for it directly:  instance  Pair Tree where  (Pair l r) = Bin l r #Or we could choose to program with  Pair instead of Tree- and thereby avoid having to define our own  instance. Moreover, Control.Monad.Free.Church provides a  instance that can improve the  asymptotic[ complexity of code that constructs free monads by effectively reassociating the use of (+). You may also want to take a look at the kan-extensions package ( 1http://hackage.haskell.org/package/kan-extensions).See * for a more formal definition of the free  for a . Add a layer. -wrap (fmap f x) "a wrap (fmap return x) >>= f =A version of lift that can be used with just a Functor for f.;A version of wrap for monad transformers over a free monad.Note:- that this is the default implementation for  for MonadFree f (t m).(C) 2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundeps Safe-Inferred +2346HMPlain iterative computations. 7The monad supporting iteration based over a base monad m.   ~ FreeT  4Builds an iterative computation from one first step.runIter . iter == id 3Executes the first step of an iterative computationiter . runIter == id*Adds an extra layer to a free monad value.'In particular, for the iterative monad X, this makes the computation require one more step, without changing its final result.runIter (delay ma) == Right ma is the left inverse of   .  =   Tear down a Free  using iteration.Like  with monadic result.Lift a monad homomorphism from m to n into a Monad homomorphism from   m to   n.GLifts a plain, non-terminating computation into a richer environment.  is a  homomorphism.#A computation that never terminates1Repeatedly run a computation until it produces a K value. This can be useful when paired with a monad that has side effects.For example, we may have genId :: IO (Maybe Id)z that uses a random number generator to allocate ids, but fails if it finds a collision. We can repeatedly run this with  ( genId) :: IO Id Cuts off an iterative computation after a given number of steps. If the number of steps is 0 or less, no computation nor monadic effects will take place.IThe step where the final value is produced also counts towards the limit.Some examples (n "e 0):  0 _ "a    (n+1)   "a     (n+1)   "a      (n+1)   "a  .  n  n  "a   ( )  n Calling    nT is always terminating, provided each of the steps in the iteration is terminating.`Interleaves the steps of a finite list of iterative computations, and collects their results.VThe resulting computation has as many steps as the longest computation in the list.VInterleaves the steps of a finite list of computations, and discards their results.VThe resulting computation has as many steps as the longest computation in the list.Equivalent to void  . Capretta's race" combinator. Satisfies left catch.3    1  (C) 2008-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundeps Safe-Inferred *+2346HMThe "free monad" for a functor f.+The "free monad transformer" for a functor f"The base functor for a free monad. 4Evaluates the first layer out of a free monad value.!'Pushes a layer into a free monad value."3Tear down a free monad transformer using iteration.#FTear down a free monad transformer using iteration over a transformer.$Lift a monad homomorphism from m to n into a monad homomorphism from  f m to  f n $ :: ( m,  f) => (m ~> n) ->  f m ~>  f n%#Lift a natural transformation from f to g into a monad homomorphism from  f m to  g n&Pull out and join m layers of  f m a.'' is the left inverse of  ' .  =  ( Tear down a   using iteration.)Like ( for monadic values.*CCuts off a tree of computations at a given depth. If the depth is 0> or less, no computation nor monadic effects will take place.Some examples (n "e 0): * 0 _ "a   * (n+1)   "a    * (n+1)   "a     * (n+1)   "a    (* n) Calling '  * nT is always terminating, provided each of the steps in the iteration is terminating.+partialIterT n phi m interprets first n layers of m using phi$. This is sort of the opposite for *.Some examples (n "e 0): + 0 _ m "a m + (n+1) phi   "a  + (n+1) phi   "a  + (n+1) phi   "a  .  . phi ,intersperseT f m inserts a layer f between every two layers in m. , f   "a  , f   "a  , f   "a    (# (  ( f)  )) -<Tear down a free monad transformer using Monad instance for t m..intercalateT f m inserts a layer f between every two layers in m and then retracts the result. . f "a - . , f > !"#$%&'()*+,-.      !"#$%&'()*+ !"#$%&'()*+,-.! "#$%&*+,.-'(): !"#$%&'()*+,-.      !"#$%&'()*+(C) 2008-2014 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisional)non-portable (rank-2 polymorphism, MTPCs) Safe-Inferred246HM/The "free monad" for a functor f.0+The "free monad transformer" for a functor f38Generate a Church-encoded free monad transformer from a  monad transformer.4 Convert to a  free monad representation.5 Unwrap the 4 monad to obtain it's Church-encoded representation.6IWrap a Church-encoding of a "free monad" as the free monad for a functor.73Tear down a free monad transformer using iteration.8FTear down a free monad transformer using iteration over a transformer.9Lift a monad homomorphism from m to n into a monad homomorphism from 0 f m to 0 f n 9 :: ( m,  n,  f) => (m ~> n) -> 0 f m ~> 0 f n:#Lift a natural transformation from f to g into a monad homomorphism from 0 f m to 0 g n;Pull out and join m layers of  f m a.<Cuts off a tree of computations at a given depth. If the depth is 0 or less, no computation nor monadic effects will take place.Some examples (n "e 0):'cutoff 0 _ == return Nothing&cutoff (n+1) . return == return . Just,cutoff (n+1) . lift == lift . liftM Just0cutoff (n+1) . wrap == wrap . fmap (cutoff n)pCalling 'retract . cutoff n' is always terminating, provided each of the steps in the iteration is terminating.== is the left inverse of  = .  =  >FTear down a free monad transformer using iteration over a transformer.? Tear down an /  using iteration.@Like ? for monadic values.A-Convert to another free monad representation.B,Generate a Church-encoded free monad from a  monad.CiImprove the asymptotic performance of code that builds a free monad with only binds and returns by using / behind the scenes.OThis is based on the "Free Monads for Less" series of articles by Edward Kmett: 4http://comonad.com/reader/2011/free-monads-for-less/ 6http://comonad.com/reader/2011/free-monads-for-less-2/Tand "Asymptotic Improvement of Computations over Free Monads" by Janis Voightlnder: (http://www.iai.uni-bonn.de/~jv/mpc08.pdfDvImprove the asymptotic performance of code that builds a free monad transformer with only binds and returns by using 0 behind the scenes. Similar to C.+/0123456789:;<=>?@ABCD,-./0123456789:;<=>?@/0123456789:;<=>?@ABCD012/65D34789:;<CAB=>?@)/0123456789:;<=>?@ABCD,-./0123456789:;<=>?@(C) 2008-2015 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundeps Safe-Inferred +2346HMEThe E  for a  f.FormallyA  n is a free  for f# if every monad homomorphism from n to another monad m1 is equivalent to a natural transformation from f to m. Why Free?AEvery "free" functor is left adjoint to some "forgetful" functor.!If we define a forgetful functor UP from the category of monads to the category of functors that just forgets the , leaving only the . i.e. U (M,,) = Mthen E is the left adjoint to U.Being E being left adjoint to U+ means that there is an isomorphism betweenE f -> m in the category of monads and f -> U m in the category of functors.(Morphisms in the category of monads are 5 homomorphisms (natural transformations that respect  and ).*Morphisms in the category of functors are ) homomorphisms (natural transformations).6Given this isomorphism, every monad homomorphism from E f to m0 is equivalent to a natural transformation from f to m;Showing that this isomorphism holds is left as an exercise.!In practice, you can just view a E f a as many layers of f wrapped around values of type a , where ()0 performs substitution and grafts new layers of f# in for each of the free variables.[This can be very useful for modeling domain specific languages, trees, or other constructs.This instance of V is fairly naive about the encoding. For more efficient free monad implementation see Control.Monad.Free.Church, in particular note the 6 combinator. You may also want to take a look at the kan-extensions package ( 1http://hackage.haskell.org/package/kan-extensions)./A number of common monads arise as free monads,Given  data Empty a, E Empty is isomorphic to the  monad.E Ap can be used to model a partiality monad where each layer represents running the computation for a while longer.HH is the left inverse of  and  H .  =  H .  =  I Tear down a E  using iteration.JLike iter for monadic values.K#Lift a natural transformation from f to g$ into a natural transformation from FreeT f to FreeT g.LjThe very definition of a free monoid is that given a natural transformation you get a monoid homomorphism.M Convert a E monad from Control.Monad.Free to a  monad from Control.Monad.Trans.Free.NCuts off a tree of computations at a given depth. If the depth is 0 or less, no computation nor monadic effects will take place.Some examples (n "e 0):'cutoff 0 _ == return Nothing&cutoff (n+1) . return == return . Just,cutoff (n+1) . lift == lift . liftM Just0cutoff (n+1) . wrap == wrap . fmap (cutoff n)pCalling 'retract . cutoff n' is always terminating, provided each of the steps in the iteration is terminating.O Unfold a free monad from a seed.P-Unfold a free monad from a seed, monadically.QThis is Prism' (Free f a) a in disguisepreview _Pure (Pure 3)Just 3 review _Pure 3 :: Free Maybe IntPure 3RThis is  Prism' (Free f a) (f (Free f a)) in disguise,preview _Free (review _Free (Just (Pure 3)))Just (Just (Pure 3))review _Free (Just (Pure 3))Free (Just (Pure 3))BLThis is not a true monad transformer. It is only a monad transformer "up to H".C3This violates the MonadPlus laws, handle with care.D5This violates the Alternative laws, handle with care.)EFGHIJKLMNOPQREFGHIJKLMNBCDOPQRSTUVWXYZ[\EFGHIJKLMNOPQREGFHIJKLMNOPQR'EGFHIJKLMNOPQREFGHIJKLMNBCDOPQRSTUVWXYZ[\(C) 2011-2015 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisional"non-portable (rank-2 polymorphism) Safe-Inferred246HM S,The Church-encoded free monad for a functor f.It is asymptotically more efficient to use () for S than it is to () with E. 6http://comonad.com/reader/2011/free-monads-for-less-2/VLike iter for monadic values.WW is the left inverse of  and  W .  =  W .  =  X#Lift a natural transformation from f to g$ into a natural transformation from F f to F g.YjThe very definition of a free monoid is that given a natural transformation you get a monoid homomorphism.Z-Convert to another free monad representation.[,Generate a Church-encoded free monad from a E monad.\iImprove the asymptotic performance of code that builds a free monad with only binds and returns by using S behind the scenes.OThis is based on the "Free Monads for Less" series of articles by Edward Kmett: 4http://comonad.com/reader/2011/free-monads-for-less/Free monads for less  Part 1 6http://comonad.com/reader/2011/free-monads-for-less-2/Free monads for less  Part 2and  (http://www.iai.uni-bonn.de/~jv/mpc08.pdf9"Asymptotic Improvement of Computations over Free Monads" by Janis Voightlnder.]Cuts off a tree of computations at a given depth. If the depth is 0 or less, no computation nor monadic effects will take place.Some examples (n "e 0):'cutoff 0 _ == return Nothing&cutoff (n+1) . return == return . Just*cutoff (n+1) . lift == lift . liftM Just/cutoff (n+1) . wrap == wrap . fmap (cutoff n)Calling W . ] nT is always terminating, provided each of the steps in the iteration is terminating.]3This violates the MonadPlus laws, handle with care.^5This violates the Alternative laws, handle with care.STUVWXYZ[\]_`abcd]efgh^ijkSTUVWXYZ[\]STU\ZV[WXY]STUVWXYZ[\]_`abcd]efgh^ijk(C) 2008-2011 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> experimentalfundeps, MPTCs Safe-Inferred2468^0Allows you to peel a layer off a cofree comonad._Remove a layer.^_lmnopq^_^_^_lmnopq (C) 2008-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundeps Safe-Inferred+2346` The cofree r of a functor f.a)This is a cofree comonad of some functor f, with a comonad w# threaded through it at each level.d;This is the base functor of the cofree comonad transformer.f$Extract the head of the base functorg%Extract the tails of the base functorh1Wrap another layer around a cofree comonad value.cofree is a right inverse of i. runCofree . cofree == id i2Unpeel the first layer off a cofree comonad value. runCofree is a right inverse of h. cofree . runCofree == id j Unfold a CofreeT= comonad transformer from a coalgebra and an initial comonad.%`abcdefghijstuvwxyz{|}~ ^_`abcdefghij abc`hide^_fgj"`abcdefghijstuvwxyz{|}~e (C) 2008-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundeps Safe-Inferred+2346kThe coiterative comonadl6This is the coiterative comonad generated by a comonado/Prepends a result to a coiterative computation. runCoiter . uncurry coiter == idp9Extracts the first result from a coiterative computation. uncurry coiter . runCoiter == idq Unfold a CoiterTJ comonad transformer from a cokleisli arrow and an initial comonadic seed.klmnopq ^_klmnopq lmnkopq^_klmnopq (C) 2008-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalMPTCs, fundeps Safe-Inferred +2346HM rThe r r of a functor f.FormallyA r v is a cofree r for f0 if every comonad homomorphism another comonad w to v1 is equivalent to a natural transformation from w to f.A cofree1 functor is right adjoint to a forgetful functor.Cofree is a functor from the category of functors to the category of comonads that is right adjoint to the forgetful functor from the category of comonads to the category of functors that forgets how to  and , leaving you with only a .eIn practice, cofree comonads are quite useful for annotating syntax trees, or talking about streams.>A number of common comonads arise directly as cofree comonads. For instance,r A* forms the a comonad for a non-empty list.r ( b) is a product.r Identity forms an infinite stream.r ((->) b)'i describes a Moore machine with states labeled with values of type a, and transitions on edges of type b.Furthermore, if the functor f7 forms a monoid (for example, by being an instance of ), the resulting r is also a . See  5http://www.cs.appstate.edu/~johannp/jfp06-revised.pdf/Monadic Augment and Generalised Shortcut Fusion5 by Neil Ghani et al., Section 4.3 for more details.In particular, if  f a "a [a]%, the resulting data structure is a  'https://en.wikipedia.org/wiki/Rose_tree Rose tree(. For a practical application, check  Ahttps://personal.cis.strath.ac.uk/neil.ghani/papers/ghani-calco07'Higher Dimensional Trees, Algebraically by Neil Ghani et al.t9Use coiteration to generate a cofree comonad from a seed. t f = u (  f)u$Unfold a cofree comonad from a seed.v1Unfold a cofree comonad from a seed, monadically.x  . x = yDThis is a lens that can be used to read or write from the target of .Using (^.) from the lens package: foo ^. y ==  fooFor more on lenses see the lens package on hackage y :: Lens' (r g a) azCThis is a lens that can be used to read or write to the tails of a r r.Using (^.) from the lens package: foo ^. z == _ fooFor more on lenses see the lens package on hackage z :: Lens' (r g a) (g (r g a)){ Construct a Lens into a r f. given a list of lenses into the base functor.For more on lenses see the lens package on hackage. telescoped ::  g => [Lens' (r g a) (g (r g a))] -> Lens' (r g a) aThis is not a true r. transformer, but this instance is convenient.$rstuvwxyz{ ^_rstuvwxyz{ rs^_xtuvwyz{#rstuvwxyz{s (C) 2012 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalGADTs, Rank2Types Safe-InferredHM| The free  for a  f. A version of lift that can be used with f.$Given a natural transformation from f to g>, this gives a canonical monoidal natural transformation from | f to g.$Given a natural transformation from f to g3 this gives a monoidal natural transformation from Alt f to Alt g. |}~|}~|}~ |}~ (C) 2012 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalGADTs, Rank2Types Safe-Inferred!"+HM A version of lift that can be used with just a  for f.$Given a natural transformation from f to g>, this gives a canonical monoidal natural transformation from  f to g.$Given a natural transformation from f to g3 this gives a monoidal natural transformation from Alt f to Alt g. (C) 2012-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalGADTs, Rank2Types Safe-Inferred!"+HM The free  for a  f. The free  for a  f. The free  transformer for a  f over  g. The free  for a  f. A version of lift) that can be used with no constraint for f.Lift an action of the "outer"  g a to  f g a.Given natural transformations f ~> h and  g . h ~> h& this gives a natural transformation  ApF f g ~> h.Given natural transformations f ~> h and  g . h ~> h& this gives a natural transformation  ApT f g ~> h.!Perform a monoidal analysis over  f g b value. Examples:  height :: ( g,  g) =>  f g a ->  height = getSum . runApT_ (_ -> Sum 1)   size :: ( g,  g) =>  f g a ->  size = getSum . runApT_ (_ -> Sum 1)  $Given a natural transformation from f to f'3 this gives a monoidal natural transformation from ApF f g to ApF f' g.$Given a natural transformation from f to f'3 this gives a monoidal natural transformation from ApT f g to ApT f' g.$Given a natural transformation from g to g'3 this gives a monoidal natural transformation from ApF f g to ApF f g'.$Given a natural transformation from g to g'3 this gives a monoidal natural transformation from ApT f g to ApT f g'.Pull out and join m layers of  f m a.$Given a natural transformation from f to g>, this gives a canonical monoidal natural transformation from  f to g."runAp t == retractApp . hoistApp t8Perform a monoidal analysis over free applicative value.Example:  count ::  f a ->  count = getSum . runAp_ (\_ -> Sum 1) JInterprets the free applicative functor over f using the semantics for  and ) given by the Applicative instance for f.retractApp == runAp id$Given a natural transformation from f to g>, this gives a canonical monoidal natural transformation from  f to g.(C) 2012-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalGADTs, Rank2Types Safe-InferredHM The free  for a  f.$Given a natural transformation from f to g>, this gives a canonical monoidal natural transformation from  f to g."runAp t == retractApp . hoistApp t8Perform a monoidal analysis over free applicative value.Example: =count :: Ap f a -> Int count = getSum . runAp_ (\_ -> Sum 1)  A version of lift that can be used with just a  for f.$Given a natural transformation from f to g3 this gives a monoidal natural transformation from Ap f to Ap g.JInterprets the free applicative functor over f using the semantics for  and ) given by the Applicative instance for f.retractApp == runAp id  (C) 2012-2013 Edward Kmett BSD-style (see the file LICENSE)Edward Kmett <ekmett@gmail.com> provisionalGADTs, Rank2Types Safe-Inferred!"+HM The free  for a  f.$Given a natural transformation from f to g>, this gives a canonical monoidal natural transformation from  f to g."runAp t == retractApp . hoistApp t8Perform a monoidal analysis over free applicative value.Example: =count :: Ap f a -> Int count = getSum . runAp_ (\_ -> Sum 1)  A version of lift that can be used with just a  for f.$Given a natural transformation from f to g3 this gives a monoidal natural transformation from Ap f to Ap g.JInterprets the free applicative functor over f using the semantics for  and ) given by the Applicative instance for f.retractApp == runAp id   !""#$%&'()*+,-./01123456789:;'$<.=>?@ABBCDEF678GHI.'?$<JKL4'$<MNO.PQRSAAF<'TUJK.VW X Y Y Z [ \ ] ^ _ ` a b c c d e f P X \ e P Q g h i j k l l m n o p l l q r 4 s n o plsttuvs4wxyz{|}~ossss4      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~MNMNM                                            ( free-4.12Control.Monad.Free.THControl.Monad.Free.ClassControl.Monad.Trans.IterControl.Monad.Trans.FreeControl.Monad.Trans.Free.ChurchControl.Monad.FreeControl.Monad.Free.ChurchControl.Comonad.Cofree.ClassControl.Comonad.Trans.CofreeControl.Comonad.Trans.CoiterControl.Comonad.CofreeControl.Alternative.Free.FinalControl.Alternative.FreeControl.Applicative.Trans.FreeControl.Applicative.Free.FinalControl.Applicative.FreeFree Control.Monadjoinimprove Data.FunctorIdentity Control.Arrow&&&makeFree makeFree_ makeFreeCon makeFreeCon_ MonadFreewrapliftFwrapTIterIterTrunIterTiterrunIterdelayretractfoldfoldM hoistIterTliftIternever untilJustcutoff interleave interleave_FreeTrunFreeTFreeFPurerunFreefreeiterTiterTM hoistFreeT transFreeT joinFreeTiterM partialIterT intersperseTretractT intercalateTFFTrunFTtoFTfromFTrunFhoistFTtransFTjoinFTfromFtoFimproveT hoistFreefoldFreetoFreeTunfoldunfoldM_Pure_FreehoistFfoldF ComonadCofreeunwrapCofreeCofreeT runCofreeTCofreeF:<headFtailFcofree runCofreecoiterTCoiterCoiterT runCoiterTcoiter runCoiter hoistCofreesection_extract_unwrap telescopedAlt_runAltliftAltrunAlthoistAlt alternativesAltFApApTgetApTApFliftApTliftApOrunApFrunApTrunApT_hoistApFhoistApTtransApFtransApTjoinApTrunAprunAp_ retractAp_runApliftAphoistApmkOpNameusesTVmkArgmapRetunifyT unifyCapturedliftConliftDecconstructorNamegenFree genFreeConArgParamCapturedparamscapturedzipExprs tyVarBndrNamefindTypeOrFailfindValueOrFailliftCon'baseGHC.Basefmap>>=MonadreturnFunctor$fMonadFreefErrorT$fMonadFreefListT$fMonadFreefIdentityT$fMonadFreefMaybeT$fMonadFreefRWST$fMonadFreefRWST0$fMonadFreefWriterT$fMonadFreefWriterT0$fMonadFreefContT$fMonadFreefStateT$fMonadFreefStateT0$fMonadFreefReaderTtransformers-0.4.3.0Data.Functor.IdentityControl.Monad.Trans.Classliftid Data.MaybeJustNothing.liftMGHC.Listiterate!!$fMonadPlusIterT iterConstr iterDataType $fDataIterT $fMonoidIterT$fMonadCatchIterT$fMonadThrowIterT$fMonadFreeIdentityIterT$fMonadContIterT$fMonadIOIterT$fMonadErroreIterT$fMonadStatesIterT$fMonadWriterwIterT$fMonadReadereIterT$fTraversable1IterT$fTraversableIterT$fFoldable1IterT$fFoldableIterT$fMonadTransIterT$fAlternativeIterT$fMonadFixIterT $fBindIterT $fApplyIterT $fMonadIterT$fApplicativeIterT$fFunctorIterT $fReadIterT $fRead1IterT $fShowIterT $fShow1IterT $fOrdIterT $fOrd1IterT $fEqIterT $fEq1IterT<$ transFreeF$fTraversableFreeT$fFoldableFreeT$fMonadCatchFreeT$fMonadThrowFreeT$fMonadFreefFreeT$fMonadPlusFreeT$fAlternativeFreeT$fMonadContFreeT$fMonadErroreFreeT$fMonadStatesFreeT$fMonadWriterwFreeT$fMonadReaderrFreeT$fMonadIOFreeT$fMonadTransFreeT $fMonadFreeT $fBindFreeT $fApplyFreeT$fApplicativeFreeT$fFunctorFreeT $fReadFreeT $fRead1FreeT $fShowFreeT $fShow1FreeT $fOrd1FreeT $fEq1FreeT$fBitraversableFreeF$fBifoldableFreeF$fBifunctorFreeF$fTraversableFreeF$fFoldableFreeF$fFunctorFreeF $fOrd1FreeF $fOrd2FreeF $fEq1FreeF $fEq2FreeF $fRead1FreeF $fRead2FreeF $fShow1FreeF $fShow2FreeF$fMonadCatchFT$fMonadThrowFT$fMonadStatesFT$fMonadWriterwFT$fMonadReaderrFT $fMonadContFT$fMonadErroreFT $fMonadIOFT$fTraversableFT $fFoldableFT $fMonadPlusFT$fAlternativeFT$fMonadTransFT$fMonadFreefFT $fMonadFT$fBindFT$fApplicativeFT $fApplyFT $fFunctorFT$fOrdFT$fEqFTMaybe$fMonadTransFree$fMonadPlusFree$fAlternativeFree$fMonadFreefFree$fMonadContFree$fMonadErroreFree$fMonadStatesFree$fMonadReadereFree$fMonadWritereFree$fTraversable1Free$fTraversableFree$fFoldable1Free$fFoldableFree$fMonadFixFree $fMonadFree $fBindFree$fApplicativeFree $fApplyFree $fFunctorFree $fReadFree $fRead1Free $fShowFree $fShow1Free $fOrdFree $fOrd1Free$fEqFree $fEq1Free $fMonadPlusF$fAlternativeF $fMonadContF$fMonadWriterwF$fMonadReadereF$fMonadStatesF $fMonadFreefF $fMonadTransF $fFoldableF $fMonadFixF$fMonadF$fBindF$fApplicativeF$fApplyF $fFunctorF$fComonadCofreefTracedT$fComonadCofreefStoreT$fComonadCofreefEnvT$fComonadCofreefIdentityT$fComonadCofreeConst(,)$fComonadCofreeMaybeNonEmpty comonad-4.2.6Control.ComonadComonad cofreeFConstr cofreeTConstrcofreeFDataTypecofreeTDataType $fDataCofreeT $fDataCofreeF$fMonadZipCofreeT$fMonadTransCofreeT$fApplicativeCofreeT$fMonadCofreeT $fOrdCofreeT $fEqCofreeT $fReadCofreeT $fShowCofreeT$fComonadCofreefCofreeT$fComonadTransCofreeT$fTraversableCofreeT$fFoldableCofreeT$fComonadCofreeT$fFunctorCofreeT$fBitraversableCofreeF$fBifoldableCofreeF$fBifunctorCofreeF$fTraversableCofreeF$fFoldableCofreeF$fFunctorCofreeF coiterTConstrcoiterTDataType $fDataCoiterT $fOrdCoiterT $fEqCoiterT $fReadCoiterT $fShowCoiterT$fComonadStoresCoiterT$fComonadTracedmCoiterT$fComonadHoistCoiterT$fComonadEnveCoiterT$fComonadCofreeIdentityCoiterT$fComonadTransCoiterT$fTraversableCoiterT$fFoldableCoiterT$fComonadCoiterT$fFunctorCoiterT$fRead1CoiterT$fShow1CoiterT $fOrd1CoiterT $fEq1CoiterTextract duplicateControl.ApplicativeConst AlternativeControl.CategoryControl.Comonad.Trans.Classlower$fComonadTransCofree$fComonadTracedmCofree$fComonadStoresCofree$fComonadEnveCofree$fTraversable1Cofree$fTraversableCofree$fFoldable1Cofree$fFoldableCofree $fOrd1Cofree $fOrdCofree $fEq1Cofree $fEqCofree $fReadCofree $fRead1Cofree $fShowCofree $fShow1Cofree$fApplicativeCofree$fComonadApplyCofree $fApplyCofree$fMonadZipCofree $fMonadCofree$fComonadCofree$fExtendCofree$fFunctorCofree$fDistributiveCofree$fComonadCofreefCofree $fMonoidAlt$fSemigroupAlt$fAlternativeAlt$fAltAlt$fApplicativeAlt $fApplyAlt $fFunctorAltliftAltF hoistAltF$fApplicativeAltF $fFunctorAltF Applicative Data.FoldableFoldableghc-prim GHC.TypesIntmaximumpure<*>$fAlternativeApT $fApplyApT $fApplyApF$fApplicativeApT$fApplicativeApF $fFunctorApT $fFunctorApF$fApplicativeAp $fApplyAp $fFunctorAp