Îõ³h,)'3Ø      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW0.4.0.0None%()-1ÁÂÉÜåêý"Š:äApplies a transformation to the tip of a curried function, coaxing it into the shape expected by a ß, which includes information about which is the primary bean and which are the secondary ones.1For pure constructors without registrations, try 7.6For effectful constructors without registrations, try 8.!More complex cases might require 9, :, or working with the  constructor itself.öAuxiliary type which contains a primary bean along with zero or more secondary beans. The secondary beans must have X instances.4An edge means that the source depends on the target.ÈThe dependencies of each bean are given separatedly from its decorators.Sometimes the )ing process goes wrong.The  identified by Ë has beans that depend on beans that can't be found either in the current  or its ancestors.ÍBeans that work both as primary beans and as secondary beans are disallowed.)Dependency cycles are disallowed by some s.Will always be [] when using ); identifies a  in a hierarchy of s when using * or +. The successful result of )ing a ). Can't do a lot with them other than to , them. +A step in the construction of a bean value. Undecorated bean. :Apply the decorator with the given index. Comes after the   and all  s with a lower index value. ÛFinal, fully decorated version of a bean. If there are no decorators, comes directly after  .,Beans that are secondary registrations of a % and which are aggregated monoidally.,Strategy for dealing with dependency cycles.Å(Terrible uninformative name caused by a metaphor stretched too far.)A way of building some beanð value, potentially requiring some dependencies, potentially returning some secondary beans along the primary beanÏ result, and also potentially requiring some initialization effect in a monad m.'Note that only the type of the primary bean is reflected in the = type. Those of the dependencies and secondary beans are not.'A typical initialization monad will be YÆ, used for example to create mutable references that the bean will use internally. Sometimes the a constructor will allocate resources with bracket-like operations, and in that case a monad like Managed might be needed instead. A list of s for the decorators of some . s for a decorator will have the bean% itself among their arguments. That beanŽ argument will be either the "bare" undecorated bean (for the first decorator) or the result of applying the previous decorator in the list.3Decorators can have other dependencies besides the bean.%A bean recipe, to be inserted into a .ÍHow to build the decorators that wrap the bean. There might be no decorators.How to build the bean itself. A map of % recipes. Parameterized by the monad m in which the  s might have effects.*Change the monad used by the beans in the .$Change the monad used by the bean's  and its .A 6 without decorators, having only the main constructor.Empty list of decorators.(Change the monad used by the decorators. +Add a new decorator that modifies the bean after all existing decorators.ÉThis means the behaviours it adds to the bean's methods will be applied first when entering the method.!+Add a new decorator that modifies the bean before all existing decorators.ÉThis means the behaviours it adds to the bean's methods will be applied last., just before entering the base bean's method.Usually   is preferrable."$Build the decorators from a list of $s, first innermost, last outermost.#Change the monad in which the 's effects take place.$Put a recipe for a  into the ..Only one recipe is allowed for each different bean type, so $ for a bean/ will overwrite previous recipes for that type.%Tweak an already existing  recipe.'Allow direct self-dependencies.ÏA bean constructor might depend on itself. This can be useful for having decorated self-invocations, because the version of the bean received as argument comes "from the future" and is already decorated. (BEWAREï: Pattern-matching too eagerly on this "bean from the future" during construction will cause infinite loops.) Note that a Z2 instance is required of the initialization monad.(ÕForbid any kind of cyclic dependencies between beans. This is probably what you want.[ÀThis function DOESN'T return the bean rep itself in the argreps.)0Build the beans using the recipes stored in the .*Cook a list of s.6s later in the list can see the beans in all previous s, but not vice versa. Beans in a / have priority over the same beans in previous s.+Cook a hierarchy of s. (Sum Int, B)makeB = \_ -> (Sum 1, B) constructorB :: Constructor IO B?constructorB = pack (valueWith \(s,bean) -> regs1 s bean) makeB:}::{data A = A deriving Showdata B = B deriving ShowmakeB :: A -> IO (Sum Int, B)makeB = \_ -> pure (Sum 1, B) constructorB :: Constructor IO BÀconstructorB = pack (effectWith \(s,bean) -> regs1 s bean) makeB:};ÙTake a curried function that constructs a bean, uncurry it recursively and then apply a  to its tip, resulting in a .:{ data A = A deriving Showdata B = B deriving Showdata C = C deriving ShowmakeB :: A -> BmakeB = \_ -> BmakeC :: A -> B -> IO CmakeC = \_ _ -> pure C constructorB :: Constructor IO BconstructorB = pack value makeB constructorC :: Constructor IO C constructorC = pack effect makeC:} There are <, =Ì... functions which work for specific number of arguments, but the generic ;" should work in most cases anyway.<Slightly simpler version of ; for 0-argument functions.=Slightly simpler version of ; for 1-argument functions.>Slightly simpler version of ; for 2-argument functions.?Slightly simpler version of ; for 3-argument functions.B Union of two )s, right-biased: prefers values from the right7 cauldron when both contain the same bean. (Note that  is left-biased.) ^accums_accumsavailable at this level92-argument constructor?3-argument constructorÀ! %'0)*+2&8:1("#$;<=>?3456/.,-79  À$%&" !;<=>?#789:3456)*+(' ,12 ./0-None-'(PThis is a copy of the Managed type from the  +https://hackage.haskell.org/package/managedmanaged package, with a dodgy  instance tacked on.QBuild a P value from a withFooÅ-style resource-handling function that accepts a continuation, like  .ÈPassing functions that do weird things like running their continuation twiceÒ will tear apart the fabric of reality. Why would you want to do that? Pass only withFoo-style functions.R9Make use of the managed resource by supplying a callback.WÍThis instance is a little dodgy (continuation-like monads don't have proper ZÂ instances) but it is nevertheless useful because it lets us use P with  allowSelfDeps%. Follow the recommendations for the Q function. ‹https://stackoverflow.com/questions/25827227/why-cant-there-be-an-instance-of-monadfix-for-the-continuation-monad#comment113010373_63906214Â"if you embrace the unsafety, it could be a fun way to tie knots."QRPPQRà      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd_efghijëcauldron-0.4.0.0-inplaceCauldronCauldron.ManagedcauldronData.MapMapControl.Monad.FixMonadFix System.IOwithFilePackerRegsDependencyGraphBadBeansMissingDependenciesDoubleDutyBeansDependencyCyclePathToCauldron BoiledBeansBeanConstructionStepBarePrimaryBeanPrimaryBeanDeco PrimaryBean SecondaryBeanFire ConstructorDecosBeandecos constructor emptyCauldron hoistCauldron hoistBeanmakeBean emptyDecos hoistDecossetConstructorsetDecos overDecosaddOuteraddInnerfromConstructorshoistConstructorinsertadjustdelete allowSelfDepsforbidDepCyclescook cookNonEmptycookTreetastetoAdjacencyMapremoveSecondaryBeans removeDecoscollapsePrimaryBeans exportToDotdefaultStepToTextregs0regs1regs2regs3valueeffect valueWith effectWithpackpack0pack1pack2pack3 $fIsListDecos$fMonoidCauldron$fSemigroupCauldron$fContravariantPacker$fSemigroupDecos $fMonoidDecos $fFunctorRegs $fFunctorArgs$fApplicativeArgs $fMonadArgs$fShowBadBeans$fFunctorExtractor$fApplicativeExtractor$fShowBeanConstructionStep$fEqBeanConstructionStep$fOrdBeanConstructionStepManagedmanagedwith$fMonadIOManaged$fMonadManaged$fApplicativeManaged$fFunctorManaged$fMonadFixManaged ghc-internalGHC.Internal.BaseMonoidghc-prim GHC.TypesIOGHC.Internal.Control.Monad.FixconstructorReps recipeRegsfollowConstructorcheckMissingDepscheckMissingDepsCauldron