hsc3-dot-0.15: haskell supercollider graph drawing

Safe HaskellNone
LanguageHaskell98

Sound.SC3.UGen.Dot.Internal

Description

Implementation of Dot language writer.

Synopsis

Documentation

bracket1 :: (a, a) -> [a] -> [a] Source

Bracket with elements.

bracket :: ([a], [a]) -> [a] -> [a] Source

Bracket with lists.

string_pp :: String -> String Source

bracket with double quotes.

label_pp :: String -> String Source

bracket with double quotes and braces.

type Attr = (String, String) Source

Key value pair.

attr_pp :: Attr -> String Source

Dot attributes are written key=value.

attr_list_pp :: [Attr] -> String Source

Attribute lists are in square brackets and comma seperated.

attr_set_pp :: String -> [Attr] -> String Source

Attribute sets are named and semi-colon terminated.

int_pp :: Int -> String Source

Type specialised show.

size_pp :: (Double, Double) -> String Source

Size is given as (width,height).

std_style :: Dot_Options -> [String] Source

Basic attribute sets given Dot_Options.

dotGraph :: Dot_Options -> Graph -> String Source

Generate dot representation of the provided unit generator graph.

view_with :: Dot_Options -> String -> IO () Source

View dot graph according to Dot_Options.

right_variant :: ([a] -> [b]) -> [a] -> [b] Source

reverse of f of reverse.

let drop_while_right f = right_variant (dropWhile f)
in drop_while_right isUpper "abcDEF" == "abc"

limit_precision_p :: Bool -> Int -> Sample -> String Source

Limited precision PP for Sample, no scientific notation.

map (limit_precision_p True 2) [1,1.25,1.12345,0,0.05,pi*1e8,1e9]

limit_precision_e :: Int -> Sample -> String Source

Limited precision PP for Sample, with scientific notation.

map (limit_precision_e 3) [1,1.25,0.05,pi*1e8,1e9]

limit_precision :: Bool -> Int -> Sample -> String Source

Variant selecting scientific notation more cautiously than haskells default PP.

map (limit_precision True 3) [1,1.25,0.05,0,pi*1e8,1e9]

limit_precision_o :: Dot_Options -> Sample -> String Source

Variant of limit_precision reading parameters from Dot_Options.

ip_record :: Dot_Options -> IP -> String Source

IP in record form.

escape_html :: String -> String Source

Very rudimentary HTML escaping.

ip_html :: Dot_Options -> IP -> String Source

IP as HTML string.

get_viewer :: Dot_Options -> IO String Source

Considering output_format read either the environment variable DOTVIEWER or SVGVIEWER, the default values are dot_viewer and svg_viewer.