ú΄zĄNone A reason why we didn'-t convert a GHC Core thing to Disciple Core.  Failure in a top-level binding. Dodgy top-level binding name. "Name read from GHC Core is empty. "Case expressions not handled yet. Unhandled literal value Cannot convert coercions. Cannot convert type casts. )Cannot convert recursive binding groups. &Cannot convert numeric type literals. 1Top level binding was not marked for conversion.     None =Take the plain unqualified printable name of a GHC variable. BCreate a fresh dummy GHC expression variable with the given type. BCreate a fresh dummy GHC expression variable with the given type. <Create a fresh dummy GHC type variable with the given type.    None >Table of GHC core expressions to use to invoke the primitives % needed by the lowering transform. "Names of all the primitive types. ) These should match the field names of  above. &Names of all the primitive operators. ) These should match the field names of  above. 4Try to slurp the primitive table from a GHC module. 1The table should be in a top-level binding named repa_primitives. F If we find it, then we add more top-level functions to the module L that select the individual primitives, then build a table of expressions $ that can be used to access them. ;Try to find the primitive table in this top level binding. ;Try to find the primitive table in this top level binding.  It needs to be named repa_primitives :Insert some top-level bindings after the primitive table. CCreate top-level projection functions based on the primitive table  attached to this variable. Make the selector table. ABuild a CoreExpr that produces the primtive with the given name. Make a sequence of binders Convert a GHC name to a string , !"#$%&'()*+,-./0123456789:;,Core variable bound to our primitive table. Names of all the primtiives. ,Core variable bound to our primtiive table. Name of the primitive we want. <*Data constructor for the primitive table. "Name of the field to project out. !Expression to produce the table. Type of the table. *Data constructor for the primtiive table. "The field we want to project out. 0All binders, and the one for our desired field. ! !"#$%&'()*+,-./0123456789:;  !"#$%&'()*+,-./0123456789:;<None=0Pretty print bound occurrences of an identifier >Wrap a ?% in parens if the predicate is true. @7The VectInfo maps names to their vectorised versions. A'An AvailInfo carries an exported name. BCDEF=GHIJ>KLMNOPQRSTUV@ABCBCDEF=GHIJ>KLMNOPQRSTUV@ANoneWIMake a wrapper to call a lowered version of a function from the original M binding. We need to unsafely pass it the world token, as well as marshall $ between boxed and unboxed types. X-Make the call site for the lowered function. WType of original version. Type of lowered version. #Lambda bound variables in wrapper. Name of lowered version. X/Type of result for original unlowered version. $Type of result for lowered version. $Exp that calls the lowered version. Y%Type of result for original version. %Types of arguments lowered arguments Types of components Z/Type of result for original unlowered version. $Type of result for lowered version. Expression for result value. WZWXYZNone[Dump a module. [[[None \]^_`abcdefg \]^_`abcde\]^_`edcbafg Noneh'Convert a FatName from a GHC variable. i2Convert a printable DDC name from a GHC variable. j$Convert a DDC name from a GHC name. kSlurp a literal. hijklhijkhijkl Nonem$Convert a type from a GHC variable. nConvert a type. oConvert a tycon. pIConvert a kind: particularly function arrows are changed to kind arrows. mnopmnpmnop Noneq,Convert a GHC module to Disciple Core Flow. KThis is a raw conversion of the AST. We still need to detect the primitive 7 flow operators before we can run the lowering pass. EWe get back a Disciple Core Flow module containing all the top-level I bindings that we could convert, and a list of reasons why conversion " for the other bindings failed. rConvert a type/;kind and add it to the import map, if conversion succeeds. sConvert top-level bindings. t0Convert a possibly recursive top-level binding. uConvert a single binding. 0 TODO: select bindings to lower more generally. vSlurp an expression. qrstuvwqqrstuvw NonexKDetect series operators in code converted from GHC Core, rewriting the raw M AST converted from GHC to be a well formed Disciple Core program. At the M same time, remember the mapping from Disciple to GHC core names so we can > convert the transformed Disciple program back to GHC core. yInitial detector state. z/Remember a mapping between a DDC and GHC name. {"Remember that is a rate variable. |'Check whether this is a rate variable. }~€xyz{| }~€xyz{|}~€xyz{| None‚ƒ„…†‡ˆ‰‚ƒ„…‚ƒ„…†‡ˆ‰None Š‹ŒŽ‘’“Š Š‹ŒŽ‘’“NoneqŠNone ”0Environment used to map DDC names to GHC names. . Used when converting DDC Core to GHC core. •!Guts of the original GHC module. –Table of Repa primitives —;Name map we got during the original GHC -> DDC conversion. ˜Locally scoped variables. ™(Covnert a type constructor application. >Note that our baked-in types Series and Vector are handled by  convertType instead. 4We require in the unboxed and boxed argument types: ( user-defined types require boxed. š@Convert a Flow type constructor name to a GHC type constructor. ›GGet the GHC boxed type corresponding to this Flow series element type. œIGet the GHC unboxed type corresponding to this Flow series element type. 9Bind a fresh GHC variable for a DDC expression variable. ž8Bind a fresh GHC type variable for a DDC type variable. ”Ÿ•–—˜ Ą˘™!Normal (unboxed?) argument types Boxed argument types š›œž ”Ÿ•–—˜ Ą˘›œž ”Ÿ•–—˜ Ą˘™š›œžNoneŁ;Convert a primop that has the same definition independent  of its type arguments. ¤GConvert a primop that has a different definition depending on the type E argument. If primops handled by this function must be detected by  isPolyTypicPrimName below. ĽJCheck whether the function with this name must be handled polytypically. 0 This needs to match all the names handled by ¤ above. ŚComplain that we couldn'#t find a primitive that we needed. ٤ĽŚ٤Ľ٤ĽŚNone§;Splice bindings from a DDC module into a GHC core program. GIf the GHC module contains a top-level binding that map onto a binding J in the DDC module then add the converted DDC binding to the GHC module 2 and patch the original GHC binding to call it. ¨DIf a GHC core binding has a matching one in the provided DDC module D then convert the DDC binding from GHC core and use that instead. Š.Lookup a top-level binding from a DDC module. Ş,Ensure any default alternative comes first. O The GHC code generator panics if there is a default alt which is not first. §Table of Repa primitives Maps DDC names to GHC names.  DDC module. GHC module guts. ¨ŠŤŹŞ­§§¨ŠŤŹŞ­NoneŽ0We use this unique when generating fresh names. DIf this is not actually unique relative to the rest of the compiler  then we're completely screwed.  GHC doesn'3t seem to have an API to generate unique prefixes. Ż&Run the lowering pass on this module. °Type check a Core Flow module ąIType check a Core Flow module, producing type annotations on every node. ŽŻ°ąŻŽŻ°ąNone˛Our vectoriser pipeline. IInject the lowering transform just after the first simplification stage, E or add a simplification and lowering at the end if there is none. ł Check if a ´ looks like the pre-simplifier. ˛ľśˇł˛˛ľśˇłNoneThe Data Flow Fusion plugin. ¸4Install a plugin into the GHC compilation pipeline. ¸¸š !"#$%&'()*+,-./01&23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrrstuvwxyz{| } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ  Ž   ‘ ’ ’ “ ” • – — ˜ ™ š › œ žŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛¨ł´ƒľśˇ¸šşťź˝ŒžżŔÁÂĂÄĹĆÇČÉĘËĚrepa-plugin-1.0.0.1Data.Array.Repa.Plugin)Data.Array.Repa.Plugin.ToDDC.Convert.Base Data.Array.Repa.Plugin.ToGHC.Var!Data.Array.Repa.Plugin.Primitives!Data.Array.Repa.Plugin.GHC.Pretty!Data.Array.Repa.Plugin.ToGHC.Wrap Data.Array.Repa.Plugin.Pass.DumpData.Array.Repa.Plugin.FatName(Data.Array.Repa.Plugin.ToDDC.Convert.Var)Data.Array.Repa.Plugin.ToDDC.Convert.Type$Data.Array.Repa.Plugin.ToDDC.Convert(Data.Array.Repa.Plugin.ToDDC.Detect.Base(Data.Array.Repa.Plugin.ToDDC.Detect.Type#Data.Array.Repa.Plugin.ToDDC.DetectData.Array.Repa.Plugin.ToDDC!Data.Array.Repa.Plugin.ToGHC.Type!Data.Array.Repa.Plugin.ToGHC.PrimData.Array.Repa.Plugin.ToGHC!Data.Array.Repa.Plugin.Pass.LowerData.Array.Repa.Plugin.PipelinepluginFail FailInBindingFailDodgyTopLevelBindingName FailEmptyNameFailUnhandledCaseFailUnhandledLiteralFailNoCoercions FailNoCastsFailNoRecursionFailNoNumericTypeLiterals FailNotMarked $fPrettyFailplainNameOfVarnewDummyExportedVar newDummyVar newDummyTyVar Primitives_primitive_types primitive_opsslurpPrimitivesfindTableFromTopBindfindTableFromBindinginsertAfterTable makeTable makeSelectors makeSelectormakeFieldBinders stringOfName prim_Series prim_Vectorprim_Ref prim_addInt prim_subInt prim_mulInt prim_divInt prim_modInt prim_remInt prim_eqInt prim_neqInt prim_gtInt prim_geInt prim_ltInt prim_leIntprim_newRefIntprim_readRefIntprim_writeRefIntprim_newRefInt_T2prim_readRefInt_T2prim_writeRefInt_T2prim_newVectorIntprim_readVectorIntprim_writeVectorIntprim_sliceVectorInt prim_loop prim_guardprim_rateOfSeries prim_nextIntprim_nextInt_T2 makeSelector'pprBound pprParen' wl-pprint-1.1Text.PrettyPrint.LeijenDoc$fPrettyVectInfo$fPrettyAvailInfo pprModGuts pprTopBinds pprTopBind pprBindingpprAlt breakWhen isSimpleXisAtomXparens'$fPrettyDataCon$fPrettyIdDetails $fPrettyTyCon$fPrettyOccName $fPrettyName $fPrettyVar$fPrettyCoercion $fPrettyType $fPrettyTyLit$fPrettyLiteral$fPrettyAltCon $fPrettyExpr wrapLowered callLoweredunwrapResultBits unwrapResultpassDumpFatName fatNameGHC fatNameDDCGhcName GhcNameIntUGhcNameLiteral GhcNameTyLit GhcNameTyCon GhcNameVar$fPrettyFatName$fPrettyGhcNameconvertFatNameconvertVarName convertNameconvertLiteraltIntU'convertVarType convertType convertTyCon convertKindconvertModGuts insertImportconvertTopBindsconvertTopBindconvertBinding convertExpr convertAltDetect zeroStatecollect setRateVar isRateVarDetectS stateNames stateRateVarsdetect matchPrim stringPrimmakePrimreturnsConstraintKind $fDetectType $fDetectTyCon $fDetectBound $fDetectBind detectModule detectMapmatchPrimArith $fDetectPat $fDetectAlt $fDetectLets $fDetectExp$fDetectDaConName $fDetectDaCon$fDetectModuleEnvenvGuts envPrimitivesenvNamesenvVarsconvertTyConAppconvertTyConPrimName convertBoxedconvertUnboxedbindVarXbindVarTconvertType_boxedconvertType_unboxed convertPrimconvertPolytypicPrimisPolytypicPrimNameerrorMissingPrim spliceModGuts spliceBindlookupModuleBindOfName shuffleAlts convertExperrorNoConversionletsHopeThisIsUnique passLowercheckFlowModule_checkFlowModulevectoriserPipelineisPreSimplifier ghc-7.6.2 CoreMonadCoreToDotodoPreSimplifier todoLowertodoDumpinstall