hsc3-rw-0.15: hsc3 re-writing

Safe HaskellSafe-Inferred

Sound.SC3.RW.ID

Contents

Description

Rewrite character identifiers for UGen.ID graphs.

Synopsis

Greek letters

greek_letters :: [(Char, Char, String)]Source

Table of greek letters (upper-case,lower-case,name).

 length greek_letters == 24
 (['

type Name_Supply = [Char]Source

Indefinite sequence of character identifiers.

greek_letters_nm :: Name_SupplySource

greek_letters as Name_Supply.

 take 4 greek_letters_nm == ['

Rewriters

rewrite :: Name_Supply -> String -> StringSource

Rewrite each haskell letter character literal at string l with values from the character supply s.

 rewrite ['

hsc3_id_rewrite :: String -> StringSource

rewrite greek_letters_nm.

 hsc3_id_rewrite "'a','.','a'" == "'

hsc3_id_clear :: String -> StringSource

IO

hsc3_id_rewrite_preprocessor :: FilePath -> FilePath -> FilePath -> IO ()Source

File based (haskell pre-processor) variant of hsc3_id_rewrite.

hsc3_id_rewrite_inplace :: FilePath -> IO ()Source

File based (inplace) variant of hsc3_id_rewrite. Copies file to ~ suffix and replaces initial file.

 let fn = "/home/rohan/sw/hsc3-graphs/gr/resonant-dust.hs"
 in hsc3_id_rewrite_file fn