.g6      !"#$%&'()*+,-./012345 6789:;<=>6789;<=>6987789;<=>f?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~2Alpha conversion. *Operations for obtaining bound variables. =Operation for collecting free variables without repetitions. Representation of patterns @-pattern  Literals !Constructor application patterns Tuple patterns  Variables 9Representation of bound variables in lambda expressions. 6Bound variable tuples. Uses the boolean value like in . 7 but when bounding input variables of hylomorphisms.  0Representation for terms in programs handled by HFusion. )Hylo application, only used for inlining F Thyloapp name recargsCount non-recargs recarg recarg may be a tuple .If expressions, only used for pretty printing Undefined computation General term application Constructor application !Function application (saturated) Case expressions Let expressions Lambda expressions BTuples. The boolean argument tells if the tuple must be flattened 6 when nested with others under an hylo application.  Literals  Variables !Representation for constructors. Representation for Literals. Rational literals Character literals Integer literals String literals Representation of variables. 7Generated identifier containing a prefix and an index. $Name found in the original program. )Representation for function definitions. !'Abstract syntax tree for programs that HFusion can handle. #Calculates arguments of a Thyloapp :  !2   !!"!Data used to generate variables. 8 The map stores for each variable name generated so far < which was the index last used to generate a fresh variable  with such a name as prefix. Creates a variable generator "#"O      !"#$%&'()*+,-./ 0123456789:0234567:0234567:;<$Errors that the algorithms in HFusion can produce. %*Thrown when translation of a program to a   values fails. &A generic error message. '`When a definition which was requested to be fused is not found among the derived hylomorphisms. (PThrown when fusion fails due to the inability of the implementation to derive a sigmaS transformer from the coalgebra of the definition at the left of the composition. )PThrown when fusion fails due to the inability of the implementation to derive a tauQ transformer from the algebra of the definition at the right of the composition. *Thrown when fusion fails due to the inability of the implementation to derive a fold from the definition at the left of the composition. +Thrown when fusion fails due to the inability of the implementation to derive an unfold from the definition at the right of the composition. ,@Thrown when hylomorphism derivation fails due to encountering a   like  & which is not expected in the input. -Thrown when hylomorphism derivation fails due to the existence of a non-saturated application of the recursive function in its definition. .An error monad with $ errors and a state 1 monad carrying a generator of fresh variables. =)Representation of sum terms of functors. >?@ANHFunctor represents products of elemental functors (constant or Id functors). I Each elemental functor is associated to a tuple element in a coalgebra. N The order in which elemental functor descriptions appear is not the order in R which they appear in the product. For getting the order, use the tuples returned [ by the coalgebra and retrieve the descriptions using the positions of the tuple elements.  In:  HF [(p,mri,mais,copies)]  * p9 is a unique identifier for the position in the product.  * mriM is the index of the mutual hylo component that is applied to this position. V If the position is not recursive, most likely there is not an entry in the list. V However there will be non-recursive positions if originally they were recursive F and then were made non-recursive as the result of a restructure.  * maisO are the indices of the hylomorphism arguments involved in the construction of T the recursive argument. They are used for fusion of hylomorphims of multiple  arguments.  * copiesK is a tree-like structures that tells how the recursive values are copied. 0 It is used for fusion of paramorphisms. BCD?Representation for terms inside tuples returned by coalgebras. m Each term is accompanied by an identifier of its position inside a tuple (a generated variable, right now). EFBA class which provides common names for operations on coalgebras  of Psi and OutF form. G1Given an alternative psi_i of a coalgebra where   [| psi_i |] = (p_i -> t_i)  and t_i is a tuple of terms:  getTerms psii = ti  [| setTerms ts psi_i |] = (p_i->ts)  getPattern psii = pi HIJUReturns a list of positions in the output tuple which reference the given variable. K9Representation for the simplest natural transformations. L [| EOlet t0s ps vs ts |]=(v&s->case t0s of Ptuple ps -> Ttuple ts)M [| EOsust [v'_1,...,v'_r] [t_1,...,t_r] [v_1,...,v_n] |]  =( *(v_1,...,v_n)->(v_1,...,v_n)[(t_1,...,t_r)/(v'_1,...,v'_r)]) N [| EOgeneral vs ts |]=(vs->ts)O  [| EOid |]=(v->v)PFA natural transformation which is the composition of all the natural N transformations in both lists, though they are composed in different orders.   [|([h1,...,hm] ,[k1,...,kn])|] = [|h1|] . ... . [|hm|] . [|kn|] . ... . [|k1|] QR+Representation of natural transformations. Q Items in the list are interpreted as terms in a sum of natural transformations. SPRepresentation for patterns of sigma. They have constructors abstracted away by M using view patterns. During inlininig this is translated into case cascades T [| Pdone |] = (nothing)1 it is a marker that there are no more patterns. UA place holder for patterns. V6[| PcaseR ih v c args [(t1,nrecs_1), ... ,(tn,nrecs_n)] |] =  !case beta v of (c1,args)->[| t1 |]; ...;(cn,args)->[| tn |] P ih is the index of the coalgebra term to select from the mutual hylo. c nrecs_i indicates for each occurrence of c which are considered non-recursive positions a for the constructor c, they are always a subset of args. This is because c can appear B in different tests with different recursive positions. W[| PcaseSana ih v p t1 |]# = case ana(beta) v of p -> [| t1 |] O ih is the index of the coalgebra term to select from the mutual hylo. X [| PcaseS v p t1 |] = case v of p -> [| t1 |]YPRepresentation for alternatives of coalgegbras in sigma(beta_1,...,beta_n) form P where beta_1,...,beta_n are coalgebras of mutual hylomorphism. Each coalgebra L component i is applied only to the i^th argument of the transfomer result. #In Sigma (casemap,ts,[ps_1,...,ps_n],[psi_1,...,psi_n]), + * ts are the terms returned by sigma. T * ps_i are the patterns corresponding to each alternative of the hylomorphism, < it contains one pattern for each recursive argument. H * psi_i is the coalgebra given as argument to sigma in position i. A Each coalgebra psi_i is really a mutual hylomorphism, that's why Z it is a list. When inlining, the coalgebra and the natural transformations of this W mutual hylo are extracted. Each component of the mutual hylo has an algebra, a Y natural transformation, a coalgebra and a function fapp returning an application Y of the hylo to its input term. The algebra is stored, because it may contain part Y of the natural transformation, but it is also used during inlining to match cases + of its hylo with patterns of sigma. Y * casemap tells how the alternatives of sigma connects with the alternatives of the U hylomorphism. Each sigma tuple must be replicated the amount specified in the * corresponding position of casemap. Z[>Representation of an alternative of a coalgebra in OutF form. B It contains a constructor to and the variables used as arguments K in the pattern, and the tuple which is returned when the pattern matches. [| OutFi (c,vs,ts) |] = (c,vs) -> ts\]<Representation for alternatives of coalgebras in OutF form. C Each list component represents the pattern and the term to return  if the pattern matches. ^_`ab/Coalgebra alternatives for generic coalgebras. 4 Each list element contains a tuple of patterns and ; a tuple of terms to be returned when the pattern matches. cd&Common operations for all coalgebras. e8Tuples returned in all the alternatives of a colagebra. fSRenames pattern variables with fresh names to avoid name captures during inlining. g@Wraps a coalgebra to store it inside a coalgebra in sigma form. h:A type to represent the union of all the coalgebras forms  we could have. ijklBCoalgebras are represented as a case inside a lambda abstraction.  [| (bs,ts,ca) |] = bs -> case ts of [| ca |] B The alternatives of the case are reconstructed depending on the  component ca. mKA representation for natural transformations embeeded in an algebra terms. n [| TWbottom |] = _ -> _|_o [| TWacomp a |] = [| a |]p [| TWsimple a |] = [| a |]q [| TWeta a eta |] = a.etar[| TWcase t0 ps ts |] = case t0 of ps[i] -> [| ts[i] |] P This constructor carries the invariant that no recursive variable could appear ^ in t0, otherwise the case could not be considered to be movable to a natural transformation. sFA representation for a term with abstracted constructor applications. t[| Taucata ft tau |] = (ft [| tau |])  where ft> is supposed to contruct a term which applies a catamorphism  to the argument u[| Taupair t tau |] = (t,[| tau |]) M This is mainly used for handling fusion of catamorphisms, which should keep L in the algebra both the term with abstracted constructors and the original  term. v[| Tausimple t |] = t 5 A term without abstracted constructor applications. w [| Taucons c ts phi eta |] = (phi.eta) [| ts |])xyz{ABodies of algebra components for algebras in the form Tau(alpha) , where alpha can be any of Phii, InF or Tau |}~7Bodies of algebra components for algebras in inF form. E It has a constructor and a list of arguments, the list of arguments E tells the arity and whether the argument is recursive in which case G it would appear as a variable which is mentioned in the corresponding  functor component.  [| InF (c,ts) |] = c .Bodies of algebra components in generic form. AEach algebra component has a list of input variables and a body, : it is a sort of lambda abstraction with an input tuple:  [| Acomp (vs,twa) |] = (v s -> twa vs) +Algebras are a case of algebra components. A sum of product functors. (A class to construct and destruct hylos DDerives an hylomorphism from a set of mutually recursive functions. I In the result, the i-th algebra, natural transformation, coalgebra and ; functor component are grouped together in a value of type  hylo Phii Psi. H There is one such group for each provided mutually recursive function. 9 Additionally each group contains a specification called 0 K which tells for each input variable if it is considered recursive or not. *Names of the mutually recursive functions ;The right hand sides of each mutually recursive definition The derived hylomorphism. ( It may return the same errors than the % derivation algorithm implemented in aA. 4Returns the algebra of a grouping of a mutual hylo. 5Replaces the algebra in a grouping of a mutual hylo. CReturns tha natural transformation in a grouping of a mutual hylo. DReplaces the natural transformation in a grouping of a mutual hylo. 6Returns the coalgebra of a grouping of a mutual hylo. 7Replaces the coalgebra in a grouping of a mutual hylo. IReturns the names of the input variables of a grouping of a mutual hylo. =Replaces the input variables of a grouping of a mutual hylo. WReturns the name of the function from which the grouping of a mutual hylo was derived. XReplaces the name of the function from which the grouping of a mutual hylo was derived. BReturns the functor of the grouping of a mutual hylo was derived. AReplaces the functor in a grouping of a mutual hylo was derived. HBuilds a grouping from an algebra, natural transformation, functor and A coalgebra component. The resulting grouping has associated name default  and it doesn't have constant arguments. %Returns the algebra input variables. *Returns the body of the agebra component. Creates an algebra component.  A fold for { values.  A sort of map for { values. A fold for TermWrapper values. 'A monadic fold for TermWrapper values. A map for TermWrapper values. /A map with accumulator for TermWrapper values. 7A monadic map with accumulator for TermWrapper values.  'forall op e. leftCompose op e == op . h (forall op e. rightCompose op e == e . op &forall e1 e2. compose e1 e2 == e1 . e2 [| composeEta a eta |] = a .eta 1forall e. compose e idEta == compose idEta e == e isIdEta e = True  = e=isIdEtaCreates a value of type D from its constituents.  ?getPosition (tupleterm p t) == p, getTerm (tupleterm p t) == t ;Positions in which the term references the given variable. VPositions in which the term references the given variable, with acompanying argument % indexes where the variable appears. A fold for ParaFunctor values. 'A monadic fold for ParaFunctor values. SMakes a term of nested tuples which mimics the structure of the ParaFunctor value. T Whenever a recursive position is found the first argument is copied, and whenever B a non-recursive position is found the second argument is copied. 1Tells if a position can be considered recursive. BReturns the identifier of the projection in a recursive position. YReturns indexes of the arguments involved in constructing the term for a given position. @Transforms the given positions from recursive to non-recursive. XExpands each position with a new functor term. It can be though of as the substitution $ operation for functor expressions. IReturns the functor term corresponding to a given position of a functor. 8Replaces recursive indexes according to the given list. /Runs a . computation using the given * variable generator. The result is either  the promised value or a $. ;<$%&'()*+,-.=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/;<<$ -,+*)('&%%&'()*+,-.=@?>>?@ABBCDEEFGHIJGHIJKONMLLMNOPQQRSXWVUTTUVWXYZZ[\\]^^_`aabccdefgefghkjiijklmrqponnopqrswvuttuvwxyyz{~}||}~/  0 Converts an 0 into the abstract syntax tree used by HFusion. A The HsModule can be obtained by parsing a Haskell program with  #Language.Haskell.Parser.parseModule 00    !;<$%&'()*+,-.=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/ 1        !"#$%&'()"*+,-./01 !"#$%&2'() !"#$%&'()3456789:;<=>?@ABCDEFGHIJKLMNOP3456;?BCFGHJKLMP344566;?BCFGHJKLMPQR1FObtains hylomorphisms representing functions in the original program. GThe hylomorphisms are returned in the second component of the output. M If a hylomorphism cannot be derived for some (possibly) mutually recursive M function definitions, then they are returned in the first component of the E output together with the error obtained when attempting derivation. 2Allows to handle parsing of an  as a . computation. HparseResult2FusionState (Language.Haskell.Parser.parseModule sourceCode)STUVWXYZ[\]R12SR12S ^_`abcdefghi ^_`abcdefghi ^_`abcdefghi3JFuses the composition of two recursive functions producing an equivalent  new recursive function. fuse f 1 g [h_1 .. h_n] dfns4 yields a set of mutually recursive functions named  h_1 .. h_n which are equivalent to f . g.  Functions f and g" must be hylomorphisms defined in dfns. fuse f 2 g [h_1 .. h_n] dfns+ yields a recursive function equivalent to \x y -> f x (g y),  fuse f 3 g [h_1 .. h_n] dfns+ yields a recursive function equivalent to \x y z -> f x y (g z),  and so on ... 4 Works like 3H but returns also a string resembling the hylomorphism which represents  the result of fusion. 5>Pretty prints a set of definitions into Haskell source code. 6  !"#$%&'()*+,-./012345601345/$-,+*)('&%."#2 !  345j !"#$%&'()*+,-./0123456789:;<=>?@A BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcddefghijkllmnoopqqrrstuvwxyz{|}~                                                                                          !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST(4!#UVWXYZ[\]^_`abcdefghijklmnop hfusion-0.0.4HFusion.HFusionHFusion.Internal.HsPrecHFusion.Internal.MessagesHFusion.Internal.HsSynHFusion.Internal.UtilsHFusion.Internal.HsPretty$HFusion.Internal.Parsing.HyloContextHFusion.Internal.HyloFaceHFusion.Internal.RenVars#HFusion.Internal.Parsing.TranslatorHFusion.Internal.FsDerivHFusion.Internal.HyloRepHFusion.Internal.InlineHFusion.Internal.FunctorRepHFusion.Internal.FuseFace#HFusion.Internal.Parsing.HyloParser HFusion.Internal.FuseEnvironmentPatternPasPlitPconsPtuplePvarBoundvarBvtupleBvarTermThyloappTparTifTbottomTappTcappTfappTcaseTletTlambTtupleTlitTvar ConstructorLiteralLratLcharLintLstringVariableVgenVuserdefDefDefvalueVarGen newVarGen FusionError ParserErrorMsgNotFoundNotSigmaNotTauNotOutFNotInF NotExpected NotSaturated FusionStaterunFusionStatehsModule2HsSyn deriveHylosparseResult2FusionStatefusefuse'hsSyn2HsSourceCodeAsocNone RightAsocLeftAsoc PrecValue LeftParam Precedencehpar parentizarinlineTerm_Variable_Not_FoundtermS_Not_Expected_Formconstructor_withOut_Variablesdefinition_Fault reading_Faultfunctions_Not_Foundfunction_Not_Found not_Foundfile_Not_Found)function_Not_Found_Either_File_AND_Systemfunction_Not_Found_In_Filefunction_Not_Found_In_System couldnt_Load comparationboth_Defs_Are_Same_Function!defintions_Are_Diferent_Functionscouldnt_Load_From_Filenot_Found_Specified_Functionsdirectory_Not_Foundunknown_Error_While_Loadingcomparation_All_FunctinoseveryDef_Is_Okthe_Diff_Defs_Are_Listed_Belowerror_Trying_Load_Hylook_Comparison_Labelerr_Comparison_Labelleft_Hylo_Not_Sigma_Formright_Hylo_Not_Tau_FormfuseOperation_Labelfuse_Tau_Operation_Labelfirst_Hylo_Not_OutF_Formsecond_Hylo_Not_Phi_Formfuse_Sigma_Operation_Labelfirst_Hylo_Not_Psi_Formsecond_Hylo_Not_InF_Formcouldnt_Fuse_Hylos4coalgebra_Should_Not_Return_Terms_Diffrent_From_Varsnot_Recibed_OutFvar_Rec_Not_BindedtWeta_UnexpectedtwaComp_UnexpectedtwBottom_Unexpected getCata_Labelunexpected_Constructed_Pairunexpected_Non_Variablesunexpected_Patternvariable_Not_Foundnot_Defined_For_Applied_Patternnot_Defined_For_Applied_Term)infix_Operator_Without_Characters_In_Name,infix_Constructor_Without_Characters_In_Namedisplay_Not_Define_For_Termno_Sound_Operation_Aplicationcould_not_read_any_input problem_LabelnonCommand_Labelerror_Found_In_Grammar bad_File_Formnot_Tau_Derived_For_Functionnot_Sigma_Derived_For_Functionhere_We_Display_All_Defsfinish_OK_Labelerror_Exceptionwelcmssghomedir load_command cmd_command save_command hylo_command envi_command def_command fuse_command help_command check_commandassertEq_command cata_command ana_command quit_commandiError_Empty_ContextiError_Empty_Input_In_LexTokeniError_lexChar illegal_Floatillegal_Character improperly_Terminated_Char_Constimproperly_Terminated_Strillegal_Char_Str_GapiError_stringGapillegal_Ctrl_ChariError_nestedComment isNot_Env"iError_Empty_Context_In_PopContext error_Labelcannot_Find_Label not_Satured not_Expected not_Derivablenot_Legal_Term not_InF_Term not_OutF_Termunmatched_F_Error debug_Message error_MessageAlphaConvertible alphaConvertVarsBvarsBVarsvarsFprodFuncFsumProg getDefName getDefTerm varPrefix thyloArgs insertElemsstr2varapplyFstbv2pattappttupleptuplebvtuplepany VarGenState getFreshVardfilterbv2termsubstitutionPattern substitutionfoldrMdelCases countLinear extractVarsvars' polishTerm polishDefremoveIfAndLets transformTermzipTree' concatMaybesinsertAt deleteEvery deleteEverys insertNew cascadeLambda equalTerms zipPatterns equalPatternsssswrapmapSelShowDocshowDoc showDocPrec mishowListmapDocSeparator showTuple mapSeparatorparlisttabstab ttupleprec tlambprectletprec tcaseprec thyloprectsumprec tfappprec tcappprectappprecmaxprecmergeCasePatternsremoveSpuriousPasmergeCasePatterns'mergeCasePatterns''substitutePatternlastVarsbaseGHC.Showshowpretty-1.0.1.2Text.PrettyPrint.HughesPJMode OneLineModeLeftMode ZigZagModePageModeStylemode lineLengthribbonsPerLinestyle fullRenderrender renderStylefcatfsepcatsep<+><>$+$$$nest zeroWidthTextptexttextcharisEmptyempty punctuatehangvcathsephcatbracesbracketsparens doubleQuotesquotesrationaldoublefloatintegerintrbracelbracerbracklbrackrparenlparenequalsspacecommacolonsemiDocChrStrPStr TextDetailsContextCtx emptyContextgetConstantArgs getCntArgPoscombineContextsextractContext mergeContext removeArgsaddArgsfindConstantArguments TermWrappablewrapTerm ParaFunctorPFcntPFidPFprodHFunctorHFPosition TupleTermTterm CoalgebraTermgetTermssetTerms getPatternsgetPosEtaOpEOletEOsust EOgeneralEOidEtaiEtaPatternSPdonePpatternPcaseR PcaseSanaPcaseSSigmaOutFiOutFcOutFPsiiRepPsiiPsi HasComponentsgetComponentTermsrenamePatternVars wrapSigma WrappedCAWCAsigmaWCAoutFWCApsi Coalgebra TermWrapperTWbottomTWacompTWsimpleTWetaTWcaseTauTermTaucataTaupair TausimpleTauconsWrapTauwrapTauTau'TauTautauTauinFTauphiInFPhii AcomponentAcompAlgebra HyloFunctorCHylo buildHylo getAlgebra setAlgebragetEtasetEta getCoalgebra setCoalgebra getContext setContextgetNamesetName getFunctor setFunctorconsHylogetVarsunwrapAwrapAfoldTaumapTaufoldTWfoldTWMmapTWmapTWacc mapTWaccM leftCompose rightComposecompose composeEtaidEtaisIdEtaisId getPositiongetTermsetTerm tupleterm getPositionsgetTupletermsWithArgIndexesfoldPFfoldPFM mapStructureisRec getRecIndex getArgIndexes makePosNRexpandPositionsexpandedremapPositionsrenameVariableshaskell-src-1.0.1.4Language.Haskell.SyntaxHsModulehsModule2HsSyn_convertDecl2Def joinEquations unifyPatternsconvertHsMatch analisePatconvertRhs2TermconvertHsExp2TermconverthsAlt2PatyTermconvertHsGuardedAlts2TermconvertPat2MyPatchangeConsAssocconvertHsLetsDect2PatyTermconvertHsName2StringconvertHsQName2PatternconvertHsQName2TermconvertLit2LitconvertHsQOP2Variable fixInfixAssoc InputLine DReturnTypeaDaAaA'aA'' intersperse removePasHylo hylo_algebra hylo_nattrans hylo_functorhylo_coalgebra hylo_context hylo_nameregenSigmaPatternVarsregenPatternVarsregenPatternVars' chainAccM Acomp2Term acomp2termShowDocAshowDocACoalgebraPrintableprintCAInlAEnvtermssustsNodeUpNodeDownTermSTbottomSTtermSTcaseR TcaseSanaTcaseSInlSTftermsgi CAInlineable caGetInline Inlineable getInline splitListinsertRecvarCasesmatchSigmaTermspvarzipTree inlineSigma weaveTermSreorganizeSigmainline inlineDeltaapplyHyloWithCntArgsremoveHyloApps reduceTransatomicOperationinlAinlTWinlTW' termS2TermnullPatternVariablesshowHyloa2termtw2termtau2termSTflivarmatchesremapgetCatabasicCARgetAnaetaParabuildParaStructureparaMKNRfusionarSimple fusionarTau etaParaTau mapTWvarstoParaderiveSigmaPatternscollectC countCasesgetSigma replicateList nullPatternS etaParaSigma psiToSigma fusionarSigmacargsfst3snd3thrd3 applyHyloListapplyHyloListCtxapplyHyloWithCtxCntArgsgetCntnullPVariablesWrapHTwrapHTWrapHAwrapHAHAHAoHAsHApHyloTHTtHTiHTpshowHTfoldHTfoldHAgetNamesgetConstantArgCountgetRecArgCountgetConstantArgPosrenameHT deriveHylofusionar fusionar' wrapHylos fusionarOutFCallDescriptionparse parseHsModulecatchParseState getCyclescollectgetDependencyGraph findCyclesremoveInputVarhandleRegularFunctionshandleRegularFunctions'buildDefgetCallsEnvBinds emptyBindsenv2FusionStaterunEnv clearFuseEnv insertFuseEnv deleteFuseEnv lookupFuseEnv fuseFuseEnv renameFuseEnv toListFuseEnv