!z'x     None""#&',-.12478=>?@ACHMPSUVXdkx?function-builder8A type class for pairs of types that can be turned into s.function-builderThefunction-builderA tricky newtype wrapper around a function that carries out a computation resulting in a monoidal output value that is passed to a continuation.Type parameters: accVType of monoidal value that is build from the parameters of the function returned by . For example: In a printf style formatting library acc could be .nextThe trick-! parameter that allows composing FunctionBuilders. Also note that (s are contravarient in this parameter; next# is the output of the continuation  acc -> next, hence this is an input from the perspective of the FunctionBuilder. f_make_next-This is usually a function type that returns next7, this is the type of the output function returned by .A FunctionBuilder acc next f0 is a newtype wrapper around functions of type (acc -> next) -> f.kThe immediate return value of the function is usually a function type, that takes zero or more arguments: a_0 -> .. -> a_N -> next.The FunctionBuilders that  returns are polymorphic in next. And next is the key for composition. For example: fb1 :: FunctionBuilder MyMonoid next (Int -> next) fb1 = addParameter undefined fb2 :: FunctionBuilder MyMonoid next (String -> next) fb2 = addParameter undefined newtype MyMonoid = MyMonoid () deriving (Semigroup, Monoid) When we desugar with ghci::t (runFunctionBuilder fb1)=(runFunctionBuilder fb1) :: (MyMonoid -> next) -> Int -> next:t (runFunctionBuilder fb2)@(runFunctionBuilder fb2) :: (MyMonoid -> next) -> String -> next"Composition comes in two flavours:  By using ~ to add to the accumulator a value passed to an additional argument of the resulting output function (see example below). By using 5 to append a fixed value to the accumulator directly.When  composing fb1 and fb2 using  we get::t (fb1 . fb2)>(fb1 . fb2) :: FunctionBuilder MyMonoid a (Int -> String -> a)And desugared:!:t runFunctionBuilder (fb1 . fb2)MrunFunctionBuilder (fb1 . fb2) :: (MyMonoid -> next) -> Int -> String -> next.What happened during composition was that the next in fb1 was used to insert into  Int -> next the String -> other_next from fb2; such that this results in Int -> (String -> other_next)>. (Note: For clarity I renamed the type local type parameter next to  other_next from fb2)Also, there is the 2 type class for types that have function builders.function-builderGet the composed output function of a .The 3 passed to this function must match this signature: %FunctionBuilder m m (arg0 -> .. -> m)5This means that the result of the generated function arg0 -> .. -> m MUST be m, the underlying .The s generated by  and e are parametric in the second type parameter and match the type signature required by this function. Example 1: fb :: FunctionBuilder String String (Int -> Double -> Int -> String) fb = undefined example :: Int -> Double -> Int -> String example = toFunction fb Example 2: %example :: Int -> Double -> Int -> String example = toFunction (i . d . i) s :: String -> FunctionBuilder String a a s x = FB (\k -> k x) i :: FunctionBuilder String next (Int -> next) i = FB (\k x -> k $ show x) d :: FunctionBuilder String next (Double -> next) d = FB (\k x -> k $ show x)function-builder Create a  that appends+ something to the (monoidal-) output value."This is a smart constructor for a '. This functions is probably equal to: immediate x = FB (\k -> k x)'The generated builder can be passed to 6 since it is parametric in its second type parameter.Example:When building a  formatting 3 the function to append a literal string could be: 7s :: String -> FunctionBuilder String a a s = immediate =c :: Char -> FunctionBuilder String a a c = immediate . (:[]) Fexample :: String example = toFunction (s "hello" . c ' ' . s "world")example "hello world"See the example in .function-builder Create a  that adds an argument to the output function, and converts that argument to a value that can be accumulated in the resulting monoidal value."This is a smart constructor for a '. This functions is probably equal to: %addParameter f = FB (\k x -> k (f x))'The generated builder can be passed to 6 since it is parametric in its second type parameter.Example:When building a  formatting G the function to append a parameter that has a show instance could be: Rshowing :: Show a => FunctionBuilder String r (a -> r) showing = addParameter show Xexample :: (Show a, Show b) => a -> b -> String example = toFunction (showing . showing)example True 0.33214 "True0.33214"See the example in . function-builder*Take away a function parameter added with  by pre - applying it to some value. For example: WintArg :: FunctionBuilder MyMonoid a (Int -> a) intArg = addParameter undefined stringArg :: FunctionBuilder MyMonoid a (String -> a) stringArg = addParameter undefined twoInt :: FunctionBuilder MyMonoid a (Int -> String -> a) twoInt = intArg . stringArg example :: FunctionBuilder MyMonoid a (String -> a) example = fillParameter twoInt 42This is equivalent to:  fillParameter f x = f  * pure x function-builder Convert a  for a function (a -> b) to (Tagged tag a -> b). function-builder Compose to s such that the second P may depend on the intermediate result of the first. Similar to a monadic bind ( but more flexible sind the underlying  may change too, for example: intText :: FunctionBuilder Text next (Int -> next) intText = addParameter undefined unpackB :: Text -> FunctionBuilder String next next unpackB = immediate . unpack intStr :: FunctionBuilder String next (Int -> next) intStr = intText `bind` unpackB function-builderiConvert the accumulated (usually monoidal-) value, this allows to change the underlying accumlator type. function-builderConvert the output of a  value; since most s are parameteric in r they also have r in a in a , such that a always either is r or is a function returning r eventually.In order to get from a 0 that can accept a continuation returning it an r to a ) that accepts continuations returning an s' instead, we need to apply a function s -> r) to the return value of the continuation. Note that a   will not only change the r to an s but probably also the the a6, when it is parametric, as in this contrived example: example :: Int -> x -> Sum Int example = toFunction (ign add) add :: FunctionBuilder (Sum Int) next (Int -> next) add = FB (\k x -> k $ Sum x) ign :: FunctionBuilder m (x -> r) a -> FunctionBuilder m r a ign = mapNext constHere the extra parameter x is  pushed down into the a of the add .function-builderAllow appending a J to another without changing the resulting output function. For example,  s that have FunctionBuilder m r r can append something to mb. It is not possible to add new parameters to the output function, this can only be done by the  instance.function-builderAllow appending a J to another without changing the resulting output function. For example,  s that have FunctionBuilder m r r can append something to mb. It is not possible to add new parameters to the output function, this can only be done by the  instance.function-builderCompose Ks such that the output function first takes all parameters from the first ) and then all parameters from the second K and then appends the results of both functions, which is why we need the  constraint.       /function-builder-0.1.1.0-2Td44eyUN78GQOw6oAgSLdData.FunctionBuilderHasFunctionBuilder ToFunctiontoFunctionBuilderFunctionBuilderFB$sel:runFunctionBuilder:FB toFunction immediate addParameter fillParameter tagParameterbindmapAccumulatormapNext$fMonadFunctionBuilder$fApplicativeFunctionBuilder$fFunctorFunctionBuilder$fMonoidFunctionBuilder$fSemigroupFunctionBuilder$fCategoryTYPEFunctionBuilderbaseGHC.BaseStringControl.Category.<>Monoid>>=Category