registry-0.1.2.2: data structure for assembling components

Safe HaskellNone
LanguageHaskell2010

Data.Registry.Internal.Operations

Contents

Description

Nested datatype to track the resolution algorithm

From this data type we can draw a graph of the full instantation of a value

Synopsis

Documentation

type Operations = [AppliedFunction] Source #

A list of function applications created when creating a value out of the Registry

data AppliedFunction Source #

A function application with an output value and a list of input values

Constructors

AppliedFunction 

makeEdges :: Operations -> [(Value, Value)] Source #

Make a list of graph edges from the list of function applications

DOT GRAPH

newtype Dot Source #

A DOT graph

Constructors

Dot 

Fields

Instances
Eq Dot Source # 
Instance details

Defined in Data.Registry.Internal.Operations

Methods

(==) :: Dot -> Dot -> Bool #

(/=) :: Dot -> Dot -> Bool #

Show Dot Source # 
Instance details

Defined in Data.Registry.Internal.Operations

Methods

showsPrec :: Int -> Dot -> ShowS #

show :: Dot -> String #

showList :: [Dot] -> ShowS #

toDot :: Operations -> Dot Source #

Make a DOT graph out of all the function applications

toDotEdge :: (Value, Value) -> Text Source #

A DOT edge representing the dependency between 2 values

nodeDescription :: ValueDescription -> Text Source #

Description of a Value in the DOT graph

adjust :: Text -> Text Source #

We need to process the node descriptions - we add quotes arountd the text - we remove quotes (") inside the text - we escape newlines

removeQuotes :: Text -> Text Source #

Remove quotes from a textual description to avoid breaking the DOT format

escapeNewlines :: Text -> Text Source #

Replace n with \n so that newlines are kept in node descriptions