Safe Haskell | None |
---|---|
Language | Haskell2010 |
Untyped implementation of the functionalities in Data.Registry.Make
Synopsis
- makeUntyped :: SomeTypeRep -> Context -> Functions -> Specializations -> Modifiers -> Stack (Maybe Value)
- makeInputs :: [SomeTypeRep] -> Context -> Functions -> Specializations -> Modifiers -> Stack [Value]
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 We keep as a State value o
:: [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