registry-0.1.6.2: data structure for assembling components

Safe HaskellNone
LanguageHaskell2010

Data.Registry.Internal.Make

Contents

Description

Untyped implementation of the functionalities in Make

Synopsis

WARNING: HIGHLY UNTYPED IMPLEMENTATION !

makeUntyped :: SomeTypeRep -> Context -> Functions -> Specializations -> Modifiers -> Stack (Maybe Value) Source #

Make a value from a desired output type represented by SomeTypeRep and a list of possible constructors A Context 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 Registry

showContextTargets :: Context -> [Text] Source #

Show the target type and possibly the constructor function requiring it for every target type in the context

makeInputs Source #

Arguments

:: Function 
-> [SomeTypeRep]

input types to build

-> Context

current context of types being built

-> Functions

available functions to build values

-> Specializations

list of values to use when in a specific context

-> Modifiers

modifiers to apply before storing made values

-> Stack [Value] 

Make 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 calls