Fv@IQ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP??? experimentalconal@conal.netQRSTUVWXYZ[\]^_`abcdefg experimentalconal@conal.net "Conversion to Haskell expressions     portable experimentalconal@conal.net%Convert between an arrow value and a "wrapped function". The "arrow"  doesn' t really have to be an arrow. I'd appreciate ideas for names &  uses.  Convert a w$-wrapped function to an arrow value Apply an arrow to a w-wrapped value portable experimentalconal@conal.net%Support needed for a hi to be a  (as j serves  k). EArrows for deep application. Most of these methods could be defined using l, but l+ is not definable for some types. If your  instance has l, you might want to use these implementations      = l m  " = l n  ! = l (\ x -> (x,x))  # = l o  $ = l (\ (f,b) -> \ c -> (f c, b))  % = l (\ (a,f) -> \ c -> (a, f c))  & = l p  ' = l q  ( = l r  ) = l (\ (a,b) -> (b,a))  * = l (\ (a,(b,c)) -> ((a,b),c))  + = l (\ ((a,b),c) -> (a,(b,c))) If your  instance does not have l, you'll have to come up @with other definitions. In any case, I recommend the following definitions, which mirror k defaults while avoiding l . Be sure also to define l or pure( to yield an error message (rather than -ping-ponging infinitely between them via the k default definitions).    s f = ) t u f t )  f v g = ! t f w g @In a few cases, there are default methods, as noted below. The defaults do not use l. Direct arrow into a function's result. Analogous to u and  s.  Identity. ! Duplicate. "Extract first. #Extract second. $%Extract function from first element. %&Extract function from second element. &Extract function from result. ' Curry arrow. (Uncurry arrow. )Swap elements. Has default. *Left-associate. Has default. +Right-associate. Has default. ,BPromote a function extractor into one that reaches into the first  element of a pair. -CPromote a function extractor into one that reaches into the second  element of a pair. .CPromote a function extractor into one that reaches into the result  element of a function. /-Extract the first component of a pair input. 0.Extract the second component of a pair input. 1Given a way to extract a d input from an a input, leaving an a'  residual input, 1 yields a way to extract a d input from an  (a,b) input, leaving an (a',b) residual input. 2 Analogous to 1. 3Flip argument order 4Like x but for  arrows instead of lists. 5Compose wrapped functions % !"#$%&'()*+,-./012345% !"#$%&'()*+,-./012345%   !"#$%&'()*+ !"#$%&'()*+,-./012345portable experimentalconal@conal.net6FA GADT alternative to terms. Allows generation of Haskell terms and,  from there, strings and eval. 789:This GADT mirrors the  class and part of the  class. ;<=>?@ABCDEFGHIJK6789:;<=>?@ABCDEFGHIJK:KJIHGFEDCBA@?>=<;69876987789:KJIHGFEDCBA@?>=<;;<=>?@ABCDEFGHIJKportable experimentalconal@conal.netLGiven a value of type (a -> (f,b -> (c,g)),e), apply a function to  just the c! part and leave the rest intact. deep = u .  . s .  . uM)Given a way to extract a function from a d value, create a way to  extract a function from a (e -> (a,d), f) value. extF = , . . . -N=To make an extractor, simply apply the extractor-transformer M  to the identity arrow. N = M  O Extract a b input from a  ((a,(b,e)),c) argument. extI = (1 . 2) /PBTypically, we will have to combine function and input extractors.  For instance, combine M and O. extFI = M OLMNOPLMNOPLMNOPy      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqopqoprstustvswxsyzsy{sw|sy}sy~stsstststsDeepArrow-0.3.3Language.Haskell.ParensLanguage.Haskell.ToHs Data.FunArrControl.Arrow.DeepArrowData.DDeepArrow Control.Arrow.DeepArrow.ExamplesCifyprettyunCifycifyExp hasOpInfoToHsExptoHsExpvaridvarsymtoHsApp1toHsApp2infixApp toHsInfix prettyAsHsExpFunArrtoArr$$FunDble resultFundupAFunfstAFunsndAFunfunFFunfunSFunfunRFun curryAFun uncurryAFunswapAFun lAssocAFun rAssocAFun DeepArrowresultidAdupAfstAsndAfunFfunSfunRcurryAuncurryAswapAlAssocArAssocAfunFirst funSecond funResultinpFinpSinpFirst inpSecondflipAunzipA->|DValZipDVAppDAExpDVDArrowSwapASndAFstADupAIdARAssocALAssocAUncurryACurryAFunRFunSFunFResultSecondFirstComposeArrdeepextFextFFextIextFICExpContextOpInfoAssocRAssocNAssocLAssocoperresetonRightlift1lift2lift3cifyExps cifyDeclscifyDeclcifyRhsopQNameopNamegetName specialNameapPrecopInfoTypeCompose-0.8.0Control.ComposeFunAFunAblebase Control.ArrowArrowarrGHC.Baseid Data.TuplefstsndflipcurryuncurrysecondControl.Category>>>first&&&***GHC.Listunzip