h$Dv      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                         None$ %'(./029>? 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   None  %'(029>?&H8 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.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(registry,A 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 contextWregistry.The dependencies of a value + the value itselfYregistryFirst 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 valuegregistryA 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[\]^_` abNone! %'(029>?*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=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 typeNone  %'(029>?-[ registry*Monadic stack for the resolution algorithmregistry)Return a value from the Stack if possibleregistry)Return a value from the Stack if possibleregistryReturn the state of the stack after executing the action This returns the list of built valuesregistry5Return the list of applied functions after resolutionregistryGet the current list of valuesregistry"Get the current list of operationsregistry!Modify the current list of valuesregistry6Store a function application in the list of operations  None! %'(029>?0mregistryApply 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 typeregistryfunctionregistryinputsregistryresultregistryfunctionregistryinputsregistryresultregistryfunctionregistryinputsregistryresultNone# %'(/029>?8registryFind 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 correctNone$ %'(./029>?<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 valuesNone  %'(029>?@ registry 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 None  %'(029>?CVregistryWe 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. None$ %'(/029>?H registryApplyLast 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 Salary None$ %'(-./029>?M registry: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 listregistry3Compute if a constructor can be added to a registryregistry&Compute the output type for a functionregistry.Compute the list of input types for a function   None# %'(/029>?ZtregistryTypeclass for extracting type representations out of a list of typesregistryContainer 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  valuesregistryAdd an element to the Registry but do not check that the inputs of a+ can already be produced by the registryregistryMake 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 Registryregistry)Create a value which can be added to the registry)Create a value which can be added to the  and "lift" it to an  contextregistryCreate a "lifted" a Valueregistry,Create a function which can be added to the registryThis 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 valueregistryOnce a value has been computed allow to modify it before storing it This keeps the same registry typeregistryInstantiating components can trigger side-effects The way the resolution algorithm works a component of type `m a` will be re-executed *everytime* it is needed as a given dependency This section adds support for memoizing those actions (component creation + optional warmup)Return memoized values for a monadic type Note that the returned Registry is in = because we are caching a value and this is a side-effect!registryMemoize *all* the output actions of a Registry when they are creating effectful components This relies on a helper data structure  tracking the types already memoized and a typeclass MemoizedActions going through the list of out types to process them one by one. Note that a type of the form a" will not be memoized (only `m a`)**545 None$ %'(./029>?]registryMake an element of type a out of the registryregistryMake an element of type a out of the registry, for a registry which was possibly created with +:registrymake for specialized valuesregistrymake for specialized valuesregistrymakeEither for specialized values, in case you are using an unchecked registryregistrymakeEither for specialized values along a path, in case you are using an unchecked registryregistryThis version of make only execute checks at runtime this can speed-up compilation when writing tests or in ghciNone! %'(029>?cv registry3Run some registry modifications in the StateT monadregistry8Add an element to the registry without changing its typeregistryAdd an element to the registry without changing its type *** This possibly adds untracked input types / output type! ***registryAdd an element to the registry without changing its type, in the State monadregistryAdd an element to the registry without changing its type, in the State monad *** This possibly adds untracked input types / output type! ***registryAdd an element to the registry without changing its type, in the State monadregistryAdd an element to the registry without changing its type, in the State monad *** This possibly adds untracked input types / output type! ***registry8Add an element to the registry without changing its typeregistryAdd an element to the registry without changing its type *** This possibly adds untracked input types / output type! ***registryRegister modifications of elements which types are already in the registryregistryConcatenate a registry to another statefully (to be used with $(makeGenerators ''MyType))registryRegister modifications of the registry without changing its typeregistryConcatenate 2 registries  None! %'(029>?dregistryReturn  as the result of the creation of a value of a given type (and throws an exception if the value cannot be created)registryReturn < as the result of the creation of a value of a given typeNone! %'(029>?fregistry&Make a DOT graph for a specific value a built from the  a is at the root of the graph and its children are values needed to build aregistry Similar to make but does not check if a can be made out of the 2 It returns a Left value if that's not the caseNone  %'(029>?hregistryThese generation options can be used to tweak the generated namesregistry;Create the haskell code presented in the module descriptionregistry7Make a typeclass using some specific generation optionsNone! %'(029>?k registry Result of a registry#A list of actions to run at startupregistryCreate a warmup action for a given component The type of the component is used as the description for the action to executeregistry Create a  from an  action returning a registry The empty registry Create a 0 with no action but just the type of a componentregistryReturn  if a  was successfulregistryCreate a successful registryCreate a failed registry,Extract the list of all the messages from a registry!Simple sequential warmup strategyregistry runs both tasks and cumulate the results exceptions are being transformed into Failed resultsNone$ %'(/0259>?tregistryThis newtype creates a monad to sequence component creation actions, cumulating start/stop tasks found along the wayregistry+Data type encapsulating resource finalizersregistryRun all finalizersregistryUse a RIO value and make sure that resources are closed Only run the action if the warmup is successfulregistryThis function must be used to run services involving a top component It creates the top component and invokes all warmup functionsThe passed function f is used to decide whether to continue or not depending on the Result;We also make sure that all effects are memoized by calling  on the Registry here!registryThis can be used if you want to insert the component creation inside another action managed with . Or if you want to call  yourself laterregistryThis runs a RIO value without closing down resources or executing startup actionsregistryUse a RIO value and make sure that resources are closed Don't run the warmupregistryUse a RIO value and make sure that resources are closed Run the warmup but ignore the resultregistryUse a RIO value and make sure that resources are closed Run a unit function with the warmup result (print or throw exception)registryInstantiate the component but don't execute the warmup (it may take time) and keep the Stop value to clean resources later This function statically checks that the component can be instantiatedregistryInstantiate the component but don't execute the warmup (it may take time) and lose a way to cleanu up resources | Almost no compilation time is spent on checking that component resolution is possibleregistryInstantiate the component but don't execute the warmup (it may take time) and lose a way to cleanu up resources Don't even check that a component can be built out of the registryregistrySame as  but keep the * value to be able to clean resources laterregistryLift a  action into the  monadregistryAllocate some resourceNone  %'(029>?u"None! %'(029>?v !""##$%&''()**+,,-../00122344567889:;;<<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                         'registry-0.2.0.2-7desX2QH9SO3QLgpO4nT5l!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.StateData.Registry.StatisticsData.Registry.DotData.Registry.THData.Registry.WarmupData.Registry.RIO 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$fOrdSpecializedContext$fShowModifiers$fSemigroupModifiers$fMonoidModifiers$fEqSpecializedContext$fShowSpecializedContext $fShowValues$fSemigroupValues$fMonoidValues$fShowSpecializations$fSemigroupSpecializations$fMonoidSpecializations$fShowSpecialization $fShowValue$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 applyLast'$fApplyVariadicf->b$fApplyVariadicffb$fApplyVariadicfab$fApplyVariadic1f->b$fApplyVariadic1ffb$fApplyVariadic2fg->b$fApplyVariadic2fgfb$fApplicativeTag $fFunctorTag $fCNumArgsS-> $fCNumArgsZa$fEqTag $fShowTag Normalized FindUnique:++Solvable:- Contains1Contains IsSameSetIsSubsetCanMakeOutputInputs$fIsSubset:outt$fIsSubset[]outt$fSolvableinsout$fIsSameSettypes1types2MemoizedActionsmemoizeActionsMemoizeRegistry_unMemoizeRegistryPathToTypeReps someTypeReps ERASED_TYPESAddRegistryLike<:Registry_values _functions_specializations _modifiers<+>registerregisterUnchecked+: normalize eraseTypes safeCoerce unsafeCoerceendvalvalToliftProvidedValuefunfunTofunAs specializespecializePath specializeValspecializePathValspecializeValTospecializePathValTotweakmemoize memoizeAllstartMemoizeRegistrymakeMemoizeRegistry$fMonoidRegistry$fSemigroupRegistry$fShowRegistry#$fAddRegistryLikeTypedTypedRegistry&$fAddRegistryLikeRegistryTypedRegistry&$fAddRegistryLikeTypedRegistryRegistry)$fAddRegistryLikeRegistryRegistryRegistry$fPathToTypeReps:$fPathToTypeReps:0$fMemoizedActions:$fMemoizedActions:0$fMemoizedActions[]make makeEithermakeSpecializedmakeSpecializedPathmakeSpecializedEithermakeSpecializedPathEithermakeEitherWithContextrunSaddFunToaddFunToUnsafeaddFunS addFunUnsafeSaddToS addToUnsafeSaddFun addFunUnsafe addToRegistry concatUnsafeSaddToRegistryUnsafeconcatRegistryUnsafemakeStatisticsmakeStatisticsEithermakeDot makeDotEitherTypeclassOptions makeTypeclassmakeTypeclassWithResultEmptyOkFailedWarmup_warmUpwarmupOf createWarmupnoWarmup declareWarmup isSuccessokfailedmessages runWarmuprunBoth$fSemigroupResult$fMonoidResult$fMonoidWarmup$fSemigroupWarmup $fEqResult $fShowResultRIOrunRIOStoprunStopwithRIO withRegistry runRegistryT unsafeRunRIOwithNoWarmupRIOwithRIOIgnoreWarmupResultwithRIOAndWarmupResultexecuteRegistry unsafeRununsafeRunDynamicunsafeRunWithStopunsafeRunDynamicWithStop warmupWithallocate$fAltRIO$fAlternativeRIO$fMonadResourceRIO$fMonadBaseIORIO$fMonadThrowRIO $fMonadIORIO $fMonadRIO$fApplicativeRIO $fFunctorRIObaseGHC.ShowShowData.Typeable.InternalTypeable Data.DynamicDynamic text-1.2.3.2Data.Text.InternalTextGHC.MVarMVarGHC.Base Applicativeghc-prim GHC.TypesIOTrue(resourcet-1.2.4.2-JFdnjm80MxJE6wI53v046b%Control.Monad.Trans.Resource.Internal ResourceTControl.Monad.Trans.Resource runResourceTversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName