registry-0.1.2.6: data structure for assembling components

Safe HaskellNone
LanguageHaskell2010

Data.Registry.Internal.Dot

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

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.Dot

Methods

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

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

Show Dot Source # 
Instance details

Defined in Data.Registry.Internal.Dot

Methods

showsPrec :: Int -> Dot -> ShowS #

show :: Dot -> String #

showList :: [Dot] -> ShowS #

type Hash = Int Source #

type Edge = (Value, Value) Source #

type Edges = [Edge] Source #

toDot :: Operations -> Dot Source #

Make a DOT graph out of all the function applications

countValueTypes :: Value -> DotState () Source #

Update a map classifying values by type

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

A DOT edge representing the dependency between 2 values

toDotVertex :: ValuesByType -> Value -> Text Source #

Represent 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 type

hashOf :: Value -> Int Source #

Return the hash of a value based on its dependencies

nodeDescription :: ValueDescription -> ValueCounter -> Text Source #

Description of a Value in the DOT graph

showValueCounter :: ValueCounter -> Text Source #

Don't show the counter if there

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