hmt-0.16: Haskell Music Theory

Safe HaskellNone
LanguageHaskell98

Music.Theory.Graph.Dot

Contents

Description

Graph (dot) functions.

Synopsis

UTIL

sep1 :: Eq t => t -> [t] -> ([t], [t]) Source #

Separate at element.

sep1 ':' "graph:layout"

maybe_quote :: String -> String Source #

Quote s if it includes white space.

map maybe_quote ["abc","a b c"] == ["abc","\"a b c\""]

assoc_union :: Eq k => [(k, v)] -> [(k, v)] -> [(k, v)] Source #

Left biased union of association lists p and q.

assoc_union [(5,"a"),(3,"b")] [(5,"A"),(7,"C")] == [(5,"a"),(3,"b"),(7,"C")]

ATTR

type DOT_KEY = String Source #

area:opt (area = graph|node|edge)

GRAPH

type GR_PP v e = (v -> Maybe String, v -> Maybe String, e -> Maybe String) Source #

Graph pretty-printer, (node->shape,node->label,edge->label)

br_csl_pp :: Show t => [t] -> String Source #

br = brace, csl = comma separated list

data G_TYPE Source #

Graph type, directed or un-directed.

Constructors

G_DIGRAPH 
G_UGRAPH 

type POS_FN v = v -> (Int, Int) Source #

Vertex position function.

g_to_dot :: G_TYPE -> [DOT_ATTR] -> GR_PP v e -> Maybe (POS_FN v) -> Gr v e -> [String] Source #

g_to_udot :: [DOT_ATTR] -> GR_PP v e -> Gr v e -> [String] Source #