h&C{      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                                  Safe-Inferred# !&()/014; X registry>Return true if the type of this type rep represents a functionregistry&Show the full type of a typeable valueregistry)Show the full type of a typeable functionregistryShow the full type of a typeable value where nested types like IO[Int] or functions are represented and non GHC types are shown with their module namesregistryShow the full type of a typeable value where nested types like IO[Int] or functions are represented and non GHC types are shown with their module namesregistryShow a type like m aregistry:Show a single type. Don't display the module for GHC typesregistry+Return true if the module name can be shownregistry3Tweak some standard module names for better display registryThis is an attempt to better render "nested" types like IO (Maybe Text) The input value is "IO Maybe Text" and the output text will be "IO (Maybe Text)" This will unfortunately not work with types having several type parameters like IO (Either Text Int) registry,Show a type constructor with its module name    Safe-Inferred !&()14;&< registrySpecify a Function to use to modify a value specify by some types paths registryList of functions modifying some values right after they have been built. This enables "tweaking" the creation process with slightly different results. Here SomeTypeRep is the target value type a andregistryFor a given context this represents the position of a specialization path in that context. startRange is the index of the start type of the specialization endRange is the index of the last type.registryList of consecutive types used when making a specific values See the comments on registryA specialization is defined by a path of types, from top to bottom in the value graph and target value, which is the value to use when we need a value on that type on that path. For example: specializationPath = [App, PaymentEngine, TransactionRepository] specializationValue = DatabaseConfig "localhost" 5432 This means that need to use this DatabaseConfig whenever trying to find inputs needed to create a TransactionRepository if that repository is necessary to create a PaymentEngine, itself involved in the creation of the AppregistrySpecification of values which become available for construction when a corresponding type comes in contextregistry(The values types that a value depends onregistry"The values that a value depends on registryThe types of values that we are trying to build at a given moment of the resolution algorithm. We also store the function requiring a given value type to provide better error messages IMPORTANT: this is a *stack*, the deepest elements in the value graph are first in the list#registryList of values available which can be used as parameters to constructors for building other values&registryThis is a list of functions (or "constructors") available for constructing values(registryA Typed value or function can be added to a Registry It is either a value, having both  and * information or a function having just  information+registryDescription of a /! with input types and output type/registryA Function is the 7 representation of a Haskell function + its description1registryDescription of a value. It might just have a description for its type when it is a value created by the resolution algorithm5registryA 5 is the  representation of a Haskell value + its description It is either provided by the user of the Registry or created as part of the resolution algorithm If a   is present for a a created value this means that this value has been written as the result of a specialization. The first type of the list of types in the context is the types under which the specialization must apply and the other types are "parents" of the current value in the value graph8registry1Describe a value with its type and actual content9registry#Describe a value with only its type:registryShow a Value from the Registry;registryCreate a Value from a Haskell value, using its Show instance for its description<registryMake a ProvidedValue=registry,make a CreatedValue in no particular context>registry3Create a Value from a Haskell value, with only its  description?registryCreate a Value from a  value and some description@registryType representation of a 5AregistryDynamic representation of a 5BregistryThe description for a 5CregistryThe dependencies for a 5DregistryA ValueDescription as . If the actual content of the 57 is provided display the type first then the contentEregistryReturn the creation context for a given value when it was created as the result of a "specialization"Fregistry:Return the specialization used to create a specific valuesGregistryReturn True if a type is part of the specialization context of a ValueHregistryReturn True if a value has transitives dependencies which are specialized valuesIregistry Create a / value from a Haskell functionJregistry Describe a / (which doesn't have a - instance) that can be put in the RegistryKregistryShow a Function as  using its DescriptionLregistryThe Description of a /MregistryDynamic representation of a /NregistryType representation of a /OregistryA + as PregistryReturn True if a / has some input parametersQregistryDisplay a list of constructorsRregistry.Add one more Function to the list of FunctionsSregistryDisplay a list of valuesTregistry(Add one more Value to the list of ValuesUregistry+Return the target types for a given contextVregistry(Return the types of all the dependenciesWregistry.The dependencies of a value + the value itselfXregistryReturn the various specialization paths which have possibly led to the creation of that valueYregistryFirst type of a specializationZregistryLast type of a specialization[registry9Return the type of the replaced value in a specialization\registryA specialization is applicable to a context if all its types are part of that context, in the right order]registry2Return the specifications valid in a given context^registryThe depth of a specialization in a context is the the index of the "deepest" type of that specialization in the stack of types of that context is the one having its "deepest" type (in the value graph) the "deepest" in the current context If there is a tie we take the "highest" highest type of each_registryRestrict a given context to the types of a specialization specializedContext :: Context -> Specialization -> Context specializedContext (Context cs) specialization = Context $ P.dropWhile (/= specializationEnd specialization) . dropWhileEnd (/= specializationStart specialization) $ csIn a given context, create a value as specified by a specialization the full context is necessary since the specificationPath is only a subpath of a given creation context`registryDisplay a list of specializations for the Registry, just showing the context (a type) in which a value must be selectedaregistry Create a / value from a Haskell functionbregistryDisplay a list of modifiers for the Registry, just showing the type of the modified valuehregistryA specialization range is preferrable to another one if its types are more specific (or "deepest" in the value graph) than the other If a path is limited to just one type then a path ending with the same type but specifying other types will take precedence See TypesSpec for some concrete examples.  !"#$%&'(*)+,.-/0124357689:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab576124389:;<=>?@ABCDEFGH/0I+,.-JKLMNOP(*)&'QR#$%ST !"UVWXYZ[\]^_` ab Safe-Inferred!!&()14;+r registryA function application with an output value and a list of input valuesregistryList of distinct paths from the root of the value graph to a leafregistryA list of function applications created when creating a value out of the RegistryregistryThis datatype records: - the created values - the applied functions - the specializations used to create valuesregistry'Create Statistics from a list of valuesregistry=Return the specializations used during the creation of valuesregistryReturn the list of distinct paths from the root of a value graph to leaves of that graph. This can be used to check if a given value was indeed used according to a given specializationregistry?Return all the paths from a given value to all its dependenciesregistry4Find the most recently created value of a given type Safe-Inferred !&()14;/< registry*Monadic stack for the resolution algorithmregistry)Return a value from the Stack if possibleregistry)Return a value from the Stack if possibleregistry-Run the stack to get a list of created valuesregistryReturn the state of the stack after executing the action This returns the list of built valuesregistry5Return the list of applied functions after resolutionregistryRun the stack to get a the statistics, starting with some initially created valuesregistryGet the current list of valuesregistry"Get the current list of operationsregistry!Modify the current list of valuesregistryModify the current operationsregistryModify the current statisticsregistry6Store a function application in the list of operations   Safe-Inferred!!&()14;2YregistryApply a function to a list of  valuesregistryApply a function modifying a single value and keeping its type to be used with Modifiersregistry4Apply a Dynamic function to a list of Dynamic valuesregistry6Apply just one dynamic parameter to a dynamic functionregistry4If Dynamic is a function collect all its input typesregistry;If the input type is a function type return its output typeregistryfunctionregistryinputsregistryresultregistryfunctionregistryinputsregistryresultregistryfunctionregistryinputsregistryresult Safe-Inferred#!&()014;9registryFind a value having a target type from: - a list of "preferred values" (Specializations) to select when we are trying to find the targe in a specific context (Context). Context describes the types of values we are currently trying to (recursively) make)a list of already created values (Values)3 subtleties: 1. if there are specialized values we need to find the most specialized for the current context, that is the one having its "targetType" the "lowest" in the values graph if an already created value has the right type but if it is a specialization and the type we are looking for is not in the specialization context then we cannot use that value, we need to recreate a brand new oneif an already created value has the right type and is not specialized but if there is an incompatible specialization for one of its dependencies then it cannot be usedregistryAmong all the applicable specializations take the most specific one if there exists anyregistry3Among all the created values, take a compatible oneif that value is a specialized value or has specialized dependencies it must be compatible with the current contextregistryFind a constructor function returning a target type from a list of constructorsregistryGiven a newly built value, check if there are modifiers for that value and apply them before "storing" the value which means adding it on top of the registry, represented by the # state in StateT Values. We use a StateT Either because applying modifiers could fail and we want to catch and report the error. Note that this error would be an implementation error (and not a user error) since at the type-level everything should be correct Safe-Inferred$!&()/014;>registryMake a value from a desired output type represented by SomeTypeRep and a list of possible constructors A   is passed in the form of a stack of the types we are trying to build so far Functions is the list of all the constructors in the Registry Specializations is a list of specific values to use in a given context, overriding the normal search Modifiers is a list of functions to apply right before a value is stored in the RegistryregistryShow the target type and possibly the constructor function requiring it for every target type in the contextregistryMake the input values of a given function When a value has been made it is placed on top of the existing registry so that it is memoized if needed in subsequent callsregistryinput types to buildregistry$current context of types being builtregistry#available functions to build valuesregistry0list of values to use when in a specific contextregistry-modifiers to apply before storing made values Safe-Inferred !&()14;Dregistry.Type alias for associating a number to a valueregistryType alias for a list of edgesregistry-Type alias for a list of an edge in the graphregistryType alias for a list of hashesregistryType alias for a ValueIdregistryType alias for a Hashregistry"List of value hashes by value typeregistryUse a State type to get the current index of a value when there are values of the same type and different hash valuesregistry A DOT graphregistryMake a list of graph edges from the list of function applicationsregistry5Make a DOT graph out of all the function applicationsregistry'Update a map classifying values by typeregistry7A DOT edge representing the dependency between 2 valuesregistryRepresent a value as a vertex in a dot graph we use some state to keep track of values of the same type The values are numbered starting from 1 when there are several of them for the same typeregistry4Return the hash of a value based on its dependenciesregistry'Description of a Value in the DOT graphregistryDon't show the counter if thereregistryWe need to process the node descriptions - we add quotes arountd the text - we remove quotes (") inside the text - we escape newlinesregistryRemove quotes from a textual description to avoid breaking the DOT formatregistryReplace n with \n so that newlines are kept in node descriptions  Safe-Inferred !&()14;GMregistryWe need to cache different values to account for the fact that different values might be specialized for the same typeregistryA thread-safe write-once cache. If you need more functionality, (e.g. multiple write, cache clearing) use an  instead.registryFetch the value stored in the cache, or call the supplied fallback and store the result, if the cache is empty.registryCreate an empty cache.  Safe-Inferred$!&()014;MregistryType family for applying a function to the last type of a function typeregistryTypeclass for counting the number of arguments of a function typeregistry1Count the number of arguments for a function typeregistry-Number of arguments for a given function typeregistryApplyLast typeclass provided by @neongreen It uses an auxiliary typeclass to count the arguments of a functionregistryThe output of some constructors can be "tagged" with a string to indicate how a given value was built.registryTypeclass for lifting a function with a result of type m b into a function with a result of type n bregistryTypeclass for lifting impure functions to effectful arguments and resultsregistryTypeclass for lifting pure functions to effectful arguments and resultsregistry7Lift a pure function to effectful arguments and resultsregistry=Lift an effectful function to effectful arguments and resultsregistryLift a function returning an effectful result to a function returning another effectful resultregistry/Tag a given constructor f with a string s. The  function only applies the tag to the output type of the constructor. For example data Salary = Fixed Int | Variable Int Double tag @Variable" Variable :: Int -> Double -> Tag Variable Salaryregistry7Apply a function to the last return value of a functionregistryInstance for n argumentsregistryInstance for zero arguments  Safe-Inferred$!&()./014;T! registry=Type family to remove some redundant types in a list of typesregistry:Return '[a] only if it is not already in the list of typesregistryExtracted from the typelevel-sets project and adapted for the Registry datatype This union deduplicates elements only if they appear in contiguously What we really want is typelevel sets but they are too slow for now 5https://github.com/dorchard/type-level-sets/issues/17registryFrom the list of all the input types and outputs types of a registry Can we create all the output types?registryShorthand type alias when many such constraints need to be added to a type signatureregistry1Compute if a type is contained in a list of typesregistry1Compute if a type is contained in a list of typesregistryCompute if each element of a list of types is the same as another in a different orderregistryCompute if each element of a list of types is contained in another listregistry0Compute if a function can be added to a registryregistry&Compute the output type for a functionregistry.Compute the list of input types for a functionregistryThe list of elements: a + els is a subset of out if els is a subset of out and a is also included in the set out. The search for a in out is done via a type family in order to be able to display an error message if it can't be found    Safe-Inferred#!&()014;g_&registryThis typeclass take an existing registry and memoize values created for the ls typesregistry-Registry where all output values are memoizedregistryTypeclass for extracting type representations out of a list of typesregistry(Singleton type representing erased typesregistryTypeclass for appending values and or registries together, without static checksregistryTypeclass for appending values and or registries together, with static checksregistryContainer for a list of functions or values Internally all functions and values are stored as 5 values so that we can access their representationregistryAppend 2 registries togetherregistryStore an element in the registry Internally elements are stored as  values The signature checks that a constructor of type a can be fully constructed from elements of the registry before adding itregistryStore an element in the registry Internally elements are stored as  valuesregistryStore an element in the registry, at the end of the registry Internally elements are stored as  valuesregistry7Add 2 typed values together to form an initial registryregistryAdd an element to the Registry but do not check that the inputs of a can already be produced by the registry8Prepend an element to the registry with no checks at allregistryMake the lists of types in the Registry unique, either for better display or for faster compile-time resolution with the make functionregistryRemove the parameters list of the registry and replace it with an empty type This makes it easier to read compilation errors where less types are being displayed On the other hand the resulting registry cannot be type-checked anymore when trying to get values out of itregistryIn case it is hard to show that the types of 2 registries align for example with conditional like if True then fun myFunctionWithKnownOutputs <: r else rregistryAnd for extreme cases where you know you're doing the right thing but can't prove itregistryThe empty Registryregistry1Create a value which can be added to the RegistryregistryCreate a value which can be added to the Registry and "lift" it to an  contextregistryCreate a "lifted" a Valueregistry4Create a function which can be added to the RegistryregistryThis is a shortcut to  fun . allTo where allTo* lifts all the inputs and output to an  contextregistryThis is a shortcut to  fun . argsTo where allTo lifts the inputs only to an  context In general  should work, even with function already returning an m a but if this is not the case (see issue #7) then funAs can be usedregistryFor a given type a being currently built when a value of type b is required pass a specific valueregistry2Specialize a function for a specific path of typesregistry _info component p1 p2)registry2count the number of parameters for a function typeregistryModify a template haskell nameregistry,Remove the module name from a qualified name Safe-Inferred!!&()14;{ !!""#$%&&'())*++,--.//0112334567789::;;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                                 registry-0.3.2.1-inplace!Data.Registry.Internal.ReflectionData.Registry.Internal.Types!Data.Registry.Internal.StatisticsData.Registry.Internal.StackData.Registry.Internal.DynamicData.Registry.Internal.RegistryData.Registry.Internal.MakeData.Registry.Internal.DotData.Registry.Internal.CacheData.Registry.LiftData.Registry.SolverData.Registry.RegistryData.Registry.MakeData.Registry.RIOData.Registry.StateData.Registry.StatisticsData.Registry.DotData.Registry.TH Data.RegistryPaths_registry isFunctionshowFullValueTypeshowFullFunctionTypeshowTheFullValueTypeshowTheFullFunctionType showNestedshowSingleTypemustShowModuleName tweakNestedparenthesizeNestedshowWithModuleNameModifierFunction ModifiersSpecializedContext _startRange _endRangeSpecializationPathSpecialization_specializationPath_specializationValueSpecializationsunSpecializationsDependenciesTypesunDependenciesTypes DependenciesunDependenciesContext _contextStackValuesunValues FunctionsTyped TypedValue TypedFunctionFunctionDescription _inputTypes _outputTypeFunctionValueDescription _valueType _valueValueValue CreatedValue ProvidedValue describeValuedescribeTypeableValue showValue createValuemakeProvidedValuemakeCreatedValuecreateTypeableValuecreateDynValuevalueDynTypeRepvalueDynvalDescriptionvalDependenciesvalDescriptionToTextspecializationContextusedSpecializationisInSpecializationContexthasSpecializedDependenciescreateFunctiondescribeFunction showFunctionfunDescriptionfunDyn funDynTypeRepfunDescriptionToText hasParametersdescribeFunctions addFunctiondescribeValuesaddValue contextTypesdependenciesTypesdependenciesOnspecializationPathsspecializationStartspecializationEndspecializationTargetTypeisContextApplicable applicableTospecializedContextcreateValueFromSpecializationdescribeSpecializationscreateConstModifierFunctiondescribeModifiers$fHashableValueDescription$fMonoidContext$fSemigroupContext$fHashableValue $fEqValue$fOrdSpecializedContext$fShowModifiers$fSemigroupModifiers$fMonoidModifiers$fEqSpecializedContext$fShowSpecializedContext $fShowValues$fSemigroupValues$fMonoidValues$fShowSpecializations$fSemigroupSpecializations$fMonoidSpecializations$fEqSpecialization$fShowSpecialization $fShowValue$fEqDependencies$fShowDependencies$fSemigroupDependencies$fMonoidDependencies$fEqDependenciesTypes$fShowDependenciesTypes$fSemigroupDependenciesTypes$fMonoidDependenciesTypes $fEqContext $fShowContext$fShowFunctions$fSemigroupFunctions$fMonoidFunctions$fShowFunction$fEqFunctionDescription$fShowFunctionDescription$fEqValueDescription$fShowValueDescriptionAppliedFunction _outputValue _inputValuesPaths Operations Statistics operationsvaluesinitStatisticsusedSpecializationsallValuesPaths valuePathsfindMostRecentValue$fMonoidStatistics$fSemigroupStatistics$fShowStatistics$fShowAppliedFunctionStackrunStackrunStackWithValues execStackexecStackWithValues evalStackevalStackWithValues getValues getOperations modifyValuesmodifyOperationsmodifyStatisticsfunctionApplied applyFunctionapplyModificationapplyFunctionDyn applyOneParamcollectInputTypes outputType findValuefindBestSpecializedValuefindCompatibleCreatedValuefindConstructor storeValue makeUntypedshowContextTargets makeInputs ValueCounterEdgesEdge ValueHashesValueIdHash ValuesByTypeDotStateDotunDot makeEdgestoDotcountValueTypes toDotEdge toDotVertexhashOfnodeDescriptionshowValueCounteradjust removeQuotesescapeNewlines$fEqDot $fShowDotKeyCachefetchnewCache $fEqCacheApplyCNumArgsgetNA CountArgsNumArgsNAZNASNatZSTagunTagApplyVariadic2applyVariadic2ApplyVariadic1applyVariadic1 ApplyVariadic applyVariadicallToargsTooutTotag applyLast$fApplyVariadicfFUNb$fApplyVariadicffb$fApplyVariadicfab$fApplyVariadic1fFUNb$fApplyVariadic1ffb$fApplyVariadic2fgFUNb$fApplyVariadic2fgfb$fApplicativeTag $fFunctorTag$fCNumArgsSFUN $fCNumArgsZa$fEqTag $fShowTag Normalized FindUnique:++Solvable:- Contains1Contains IsSameSetIsSubsetCanMakeOutputInputs$fIsSubset:outt$fIsSubset[]outt$fSolvableinsout$fIsSameSettypes1types2MemoizedActionsmemoizeActionsMemoizeRegistry_unMemoizeRegistryPathToTypeReps someTypeReps ERASED_TYPESAddRegistryUncheckedLike<+AddRegistryLike<:Registry_values _functions_specializations _modifiers<+>registerregisterUncheckedappendUncheckedaddTypedUnchecked+: normalize eraseTypes safeCoerce unsafeCoerceendvalvalToliftProvidedValuefunfunTofunAs specializespecializePath specializeValspecializePathValspecializeValTospecializePathValTotweakmemoize memoizeAllstartMemoizeRegistrymakeMemoizeRegistry$fMonoidRegistry$fSemigroupRegistry$fShowRegistry#$fAddRegistryLikeTypedTypedRegistry&$fAddRegistryLikeRegistryTypedRegistry&$fAddRegistryLikeTypedRegistryRegistry)$fAddRegistryLikeRegistryRegistryRegistry,$fAddRegistryUncheckedLikeTypedTypedRegistry/$fAddRegistryUncheckedLikeRegistryTypedRegistry/$fAddRegistryUncheckedLikeTypedRegistryRegistry2$fAddRegistryUncheckedLikeRegistryRegistryRegistry$fPathToTypeReps:$fPathToTypeReps:0$fMemoizedActions:$fMemoizedActions:0$fMemoizedActions[]makemakeSafe makeEithermakeSpecializedmakeSpecializedPathmakeSpecializedEithermakeSpecializedPathEithermakeEitherWithContextRIO withRegistry runRegistryTrunSaddFunToaddFunToUnsafeaddFunS addFunUnsafeSaddToS addToUnsafeSaddFun addFunUnsafe addToRegistry concatUnsafeSaddToRegistryUnsafeconcatRegistryUnsafemakeStatisticsmakeStatisticsEithermakeDot makeDotEitherTypeclassOptions makeTypeclassmakeTypeclassWithbaseGHC.ShowShowData.Typeable.InternalTypeable Data.DynamicDynamic text-1.2.5.0Data.Text.InternalTextGHC.MVarMVarGHC.Base Applicativeghc-prim GHC.TypesIOcreateReadertInstancemakeFunctionDeclarationmakeFunctionInstancecountNumberOfParameters modifyName dropQualifiedversiongetDataFileName getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDir