h*20      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab 0.2.3.7(c) Mateusz Koczko, 2016MITmateusz.p.kloczko@gmail.com experimentalGHC-only Safe-Inferredderive-storable-pluginGet ids from core bind.derive-storable-plugin#Get all expressions from a binding.derive-storable-plugin4Get both identifiers and expressions from a binding.derive-storable-pluginGet all IDs from CoreExprderive-storable-plugin'Takes first n characters out of occNamederive-storable-pluginEquality for types derive-storable-pluginEquality for type binders derive-storable-pluginc function for types  (c) Mateusz Koczko, 2016MITmateusz.p.kloczko@gmail.com experimentalGHC-only Safe-Inferred4 derive-storable-pluginAll possible errors.derive-storable-plugin&Could not obtain the type from the id.derive-storable-plugin2The binding is recursive and won't be substituted.derive-storable-pluginThe compilation-substitution is not supported for the given binding.derive-storable-plugin9Error during compilation. The CoreBind is to be returned.derive-storable-plugin"Ordering failed for core bindings.derive-storable-pluginOrdering failed for typesderive-storable-pluginAny other error.derive-storable-pluginContains user-specified flags.derive-storable-plugin=Crash when an recoverable error occurs. For testing purposes.derive-storable-plugin#How verbose should the messages be.derive-storable-plugin+Print an error according to verbosity flag.derive-storable-pluginChange String to SDoc. Each newline is $$ed with nest equal to spaces before. t is 4.(c) Mateusz Koczko, 2016MITmateusz.p.kloczko@gmail.com experimentalGHC-only Safe-Inferredderive-storable-plugin7Predicate used to find GStorable instances identifiers. derive-storable-plugin*Predicate used to find gsizeOf identifiers!derive-storable-plugin-Predicate used to find galignment identifiers"derive-storable-plugin/Predicate used to find gpeekByteOff identifiers#derive-storable-plugin/Predicate used to find gpeekByteOff identifiers$derive-storable-plugin+Predicate used to find chSizeOf identifiers%derive-storable-plugin.Predicate used to find chAlignment identifiers&derive-storable-plugin0Predicate used to find chPeekByteOff identifiers'derive-storable-plugin0Predicate used to find chPokeByteOff identifiers(derive-storable-pluginPredicate used to find specialized GStorable instance identifiers)derive-storable-plugin6Predicate used to find specialized gsizeOf identifiers*derive-storable-plugin9Predicate used to find specialized galignment identifiers+derive-storable-plugin;Predicate used to find specialized gpeekByteOff identifiers,derive-storable-plugin;Predicate used to find specialized gpokeByteOff identifiers-derive-storable-pluginIs offsets id..derive-storable-pluginIs a GStorable identifier/derive-storable-pluginIs the id an GStorable method.0derive-storable-plugin"Check if binding is non-recursive.1derive-storable-plugin8Lift the identifier predicate to work on a core binding.2derive-storable-pluginUse both type getters and identifier predicate to create a predicate. !"#()*+,$%&'-./012 !"#()*+,$%&'-./012(c) Mateusz Koczko, 2016MITmateusz.p.kloczko@gmail.com experimentalGHC-only Safe-InferredS3derive-storable-plugin!Check whether the type is integer4derive-storable-plugin#Check whether the type is a Pointer5derive-storable-pluginCheck whether the type is a IO.6derive-storable-plugin,Check whether the type constructor is an IO.7derive-storable-plugin"Check whether the type is a State#8derive-storable-plugin.Check whether the type constructor is a State#9derive-storable-plugin&Check whether the type is a RealWorld#:derive-storable-plugin2Check whether the type constructor is a RealWorld#dderive-storable-plugin-Check whether the type is a State# RealWorld.;derive-storable-plugin0Check whether the type constuctor is a GStorable<derive-storable-plugin2Check whether the type is of kind * -> Constraint.=derive-storable-plugin1Check whether the type has GStorable constraints.>derive-storable-plugin%Get the type from GStorable instance.?derive-storable-plugin,Get the type from GStorable alignment method@derive-storable-plugin)Get the type from GStorable sizeOf methodAderive-storable-plugin'Get the type from GStorable peek methodederive-storable-pluginInsides of getPeekType, which takes into the account the order of arguments.Bderive-storable-plugin'Get the type from GStorable poke methodCderive-storable-plugin-Get the type of Offsets. Assuming it is [Int]Dderive-storable-plugin/Combination of type getters for all GStorables.Ederive-storable-plugin2Combination of type getters for GStorable methods.ederive-storable-plugin Is after Ptrderive-storable-plugin Is after Intderive-storable-plugin Returningfderive-storable-plugin Is after Ptrderive-storable-plugin Is after Intderive-storable-plugin Returning3456789:;<=>?@ABCDE3456789:;<=>?@ABCDE(c) Mateusz Koczko, 2016MITmateusz.p.kloczko@gmail.com experimentalGHC-only Safe-Inferred gderive-storable-pluginUsed for type substitution. Whether a TyVar appears, replace it with a Type.Fderive-storable-pluginCalculate the order of types.hderive-storable-pluginThis could be done more efficently if we'd represent the problem as a graph problem.Gderive-storable-plugin'Functions doing the type substitutions.Hderive-storable-plugin6Get data constructor arguments from an algebraic type.Iderive-storable-plugin(Group bindings according to type groups.iderive-storable-pluginIteration for groupBindshderive-storable-plugin Type to checkderive-storable-pluginType that are checkedderive-storable-pluginType that are in this layerderive-storable-pluginType that are not.Iderive-storable-plugin Type groups.derive-storable-pluginShould be only NonRecs.iderive-storable-pluginGroup of typesderive-storable-pluginUngrouped bindingsderive-storable-pluginGrouped bindingsderive-storable-plugin'Grouped bindings, and perhaps an error)FGHIFGHI(c) Mateusz Koczko, 2016MITmateusz.p.kloczko@gmail.com experimentalGHC-only Safe-Inferred)Jderive-storable-plugin(Scoped variables for optimising offsets.Mderive-storable-pluginCompile an expression.Nderive-storable-plugin6Try to compile an expression. Perhaps return an error.jderive-storable-plugin+A small helper - create an integer literal.Oderive-storable-plugin%Create an expression of form: x -> 16Pderive-storable-plugin5For gsizeOf and galignment - calculate the variables.Qderive-storable-pluginTry to substitute the offsets.Rderive-storable-pluginGet k from JSderive-storable-pluginGet l from JTderive-storable-plugin+Create a list expression from Haskell list.Uderive-storable-plugin?Compile expression to list and then write it back to core expr.mderive-storable-pluginCreate a int prim expression.nderive-storable-pluginCompile expression to int prim and then write it back to core expr.Vderive-storable-plugin2Return the expression if it's a literal or global.Wderive-storable-pluginCheck whether the given CoreExpr is an id, and if yes - substitute it.Xderive-storable-pluginIs an "$w!!" identifierYderive-storable-pluginTry to create a compileable version of case expr body. For !! @Int offsets val expressions.Zderive-storable-pluginSubstitute the offsets in a tree. All top-level local ids should be alread in place. Now try to compile selected expressions (See note [Offset substitution])[derive-storable-plugin3Compile the expression in Core Bind and replace it.oderive-storable-plugin5Put the expression back into the unfolding core expr.\derive-storable-pluginLint a binding]derive-storable-pluginSubstitutes the localIds inside the bindings with bodies of provided bindings.pderive-storable-pluginSubstitutes the localIds inside the expressions with bodies of provided bindings.^derive-storable-pluginCompile ordered binding.qderive-storable-plugin$The insides of compileGroups method.rderive-storable-plugin-Handle errors during the compileGroups stage.\derive-storable-plugin3Core binding to use when returning CompilationErrorderive-storable-pluginCore binding to checkderive-storable-pluginSuccess or failure]derive-storable-plugin%Replace with - for GStorable bindingsderive-storable-plugin%Replace with - for other top-bindingsderive-storable-plugin%Binding which will have ids replaced.derive-storable-pluginBinding with replaced ids.pderive-storable-plugin$Replace with - for GStorable bindinsderive-storable-plugin%Replace with - for other top-bindingsderive-storable-plugin(Expression which will have ids replaced.derive-storable-pluginExpression with replaced ids.^derive-storable-pluginError handling.derive-storable-pluginOrdered gstorable bindings.derive-storable-plugin/Non-gstorable bindings, used for replacing ids.derive-storable-pluginThe compiled (or not) bindings.qderive-storable-pluginFor error handling.derive-storable-pluginDepth, useful for debugging.derive-storable-pluginOrdered GStorable bindings.derive-storable-pluginOther top-level bindingsderive-storable-pluginSuccesfull substitutions.derive-storable-pluginUnsuccesfull substitutions.derive-storable-plugin/Both successfull and unsuccesfull subtitutions.rderive-storable-pluginError handlingderive-storable-pluginCurrent iterationderive-storable-pluginList of errorsderive-storable-pluginBindings from errors.MNOPQZJKLRSTUVWXY[\]^MNOPQZJKLRSTUVWXY[\]^(c) Mateusz Koczko, 2016MITmateusz.p.kloczko@gmail.com experimentalGHC-only Safe-Inferred-`derive-storable-pluginFind GStorable identifiers, obtain their types, and calculate the order of compilation.sderive-storable-pluginPrint errors related to CoreBind grouping. Return the badly grouped bindings, and perhaps crash the compiler.tderive-storable-plugin5Print the information related to found GStorable ids.aderive-storable-plugin+Do the optimisation for GStorable bindings.sderive-storable-pluginVerbosity and ToCrash optionsderive-storable-plugin The errorderive-storable-pluginRecovered bindings.tderive-storable-pluginVerbosity and ToCrash optionsderive-storable-pluginGStorable ids.aderive-storable-pluginVerbosity and ToCrash options.derive-storable-pluginReference to grouped types.derive-storable-plugin"Information about compiled module.derive-storable-pluginInformation about compiled module, with GStorable optimisations.`a`a(c) Mateusz Koczko, 2016MITmateusz.p.kloczko@gmail.com experimentalGHC-only Safe-Inferred0|bderive-storable-pluginThe plugin itself.uderive-storable-plugin5Checks whether the core pass is a simplifier phase 0.vderive-storable-plugin'Return the index of simplifier phase 0.wderive-storable-plugin4Checks whether the core pass is a specialising pass.xderive-storable-plugin*Return the index of the specialising pass.yderive-storable-pluginSet the verbosity and ToCrash flags based on supplied arguments.zderive-storable-pluginParse command line options.{derive-storable-plugin!Inform about installation errors.bb      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxvyz{|}~&derive-storable-plugin-0.2.3.7-inplace0Foreign.Storable.Generic.Plugin.Internal.Helpers.Foreign.Storable.Generic.Plugin.Internal.Error3Foreign.Storable.Generic.Plugin.Internal.Predicates.Foreign.Storable.Generic.Plugin.Internal.Types3Foreign.Storable.Generic.Plugin.Internal.GroupTypes0Foreign.Storable.Generic.Plugin.Internal.Compile(Foreign.Storable.Generic.Plugin.InternalForeign.Storable.Generic.Pluginderive-storable-plugin TyCoVarBinderTyBinder getIdsBind getExprsBindgetIdsExprsBind getIdsExpr extractAlt cutOccNameeqTypeeqTyBind eqTyVarBindelemTypeisProxy removeProxyError TypeNotFound RecBindingCompilationNotSupportedCompilationErrorOrderingFailedBindsOrderingFailedTypes OtherErrorFlagsCrashOnWarning VerbosityNoneSomeAllpprError stringToPprisGStorableInstId isSizeOfId isAlignmentIdisPeekIdisPokeIdisChoiceSizeOfIdisChoiceAlignmentIdisChoicePeekIdisChoicePokeIdisSpecGStorableInstIdisSpecSizeOfIdisSpecAlignmentId isSpecPeekId isSpecPokeId isOffsetsId isGStorableIdisGStorableMethodId isNonRecBindtoIsBind withTypeCheck isIntType isPtrTypeisIOType isIOTyConisStatePrimTypeisStatePrimTyConisRealWorldTypeisRealWorldTyConisGStorableInstTyConhasConstraintKindhasGStorableConstraintsgetGStorableInstTypegetAlignmentType getSizeType getPeekType getPokeTypegetOffsetsTypegetGStorableTypegetGStorableMethodTypecalcGroupOrdersubstituteTyCongetDataConArgs groupBinds OffsetScopeIntList IntPrimVal compileExprtryCompileExpr intToExprintSubstitutionoffsetSubstitution getScopeId getScopeExpr intListExpr exprToIntList isLitOrGlobal inScopeAll isIndexer caseExprIndexoffsetSubstitutionTreecompileGStorableBindlintBindreplaceIdsBind compileGroups$fOutputableOffsetScope groupTypesgstorableSubstitutionpluginbase Data.FoldableelemisStateRealWorld getPeekType' getPokeType' TypeScopecalcGroupOrder_iterationgroupBinds_rec intLiteralghc GHC.Types.VarIdGHC.CoreCoreExprintPrimValExpr exprToIntValreplaceUnfoldingBind replaceIdscompileGroups_reccompileGroups_errorgrouping_errorsfoundBinds_infoisPhase0 afterPhase0 isSpecializeafterSpecializesetOpts parseOpts install_err