registry-0.1.1.0: data structure for assembling "components"

Safe HaskellNone
LanguageHaskell2010

Data.Registry.Internal.Types

Description

List of types used inside the Registry

Synopsis

Documentation

data Value Source #

A Function is the Dynamic 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

Instances
Show Value Source # 
Instance details

Defined in Data.Registry.Internal.Types

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

data ValueDescription Source #

Description of a value. It might just have a description for its type when it is a value created by the resolution algorithm

describeValue :: (Typeable a, Show a) => a -> ValueDescription Source #

Describe a value with its type and actual content

describeTypeableValue :: Typeable a => a -> ValueDescription Source #

Describe a value with only its type

showValue :: Value -> Text Source #

Show a Value from the Registry

createValue :: (Show a, Typeable a) => a -> Value Source #

Create a Value from a Haskell value, with its Show description

createTypeableValue :: Typeable a => a -> Value Source #

Create a Value from a Haskell value, with only its Typeable description

createDynValue :: Dynamic -> Text -> Value Source #

Create a Value from a Dynamic value and some description

valueDynTypeRep :: Value -> SomeTypeRep Source #

Type representation of a Value

valueDyn :: Value -> Dynamic Source #

Dynamic representation of a Value

valDescription :: Value -> ValueDescription Source #

The description for a Value

valDescriptionToText :: ValueDescription -> Text Source #

A ValueDescription as Text. If the actual content of the Value is provided display the type first then the content

data Function Source #

A Function is the Dynamic representation of a Haskell function + its description

Instances
Show Function Source # 
Instance details

Defined in Data.Registry.Internal.Types

createFunction :: Typeable a => a -> Function Source #

Create a Function value from a Haskell function

describeFunction :: Typeable a => a -> FunctionDescription Source #

Describe a Function (which doesn't have a Show instance) that can be put in the Registry

showFunction :: Function -> Text Source #

Show a Function as Text using its Description

funDyn :: Function -> Dynamic Source #

Dynamic representation of a Function

funDynTypeRep :: Function -> SomeTypeRep Source #

Type representation of a Function

hasParameters :: Function -> Bool Source #

Return True if a Function has some input values

data Typed a Source #

A Typed value can be added to a Registry It is either a value, having both Show and Typeable information or a function having just Typeable information

newtype Functions Source #

The list of functions available for constructing other values

Constructors

Functions [Function] 

addFunction :: Function -> Functions -> Functions Source #

Add one more Function to the list of Functions

newtype Values Source #

List of values available for constructing other values

Constructors

Values [Value] 
Instances
Show Values Source # 
Instance details

Defined in Data.Registry.Internal.Types

Semigroup Values Source # 
Instance details

Defined in Data.Registry.Internal.Types

Monoid Values Source # 
Instance details

Defined in Data.Registry.Internal.Types

addValue :: Value -> Values -> Values Source #

Add one more Value to the list of Values

newtype Context Source #

The types of values being currently built

Constructors

Context 

Fields

newtype Modifiers Source #

List 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 and

Constructors

Modifiers [(SomeTypeRep, Function)]