hsc3-rw-0.15: hsc3 re-writing

Safe HaskellSafe-Inferred

Sound.SC3.RW.HA

Contents

Description

Hash at-sign. A simple minded haskell pre-processor that extends the haskell syntax by rewriting #@ sequences with a string indicating the line and column number of the occurence. The basic pre-processor is ha_rewrite.

Synopsis

Hash At-Sign

ha_split :: Integer -> String -> (Integer, String, String)Source

Find next hash-at, if there is one.

 ha_split 0 "let o = sinOsc AR (rand #@ 220 440) 0 * 0.1"

ha_insert :: Integer -> Integer -> StringSource

Generate replacement for hash-at given line and column numbers.

 ha_insert 14 23 == "(hash \"14:21\")"

ha_process_ln :: Integer -> String -> StringSource

Process line given line number.

 putStrLn$ha_process_ln 1 "let o = sinOsc AR (rand #@ 220 440) (rand2 #@ pi) * 0.1"

ha_rewrite :: [String] -> [String]Source

Re-write lines, starting at 1.

ha_rewrite_ghcF :: IO ()Source

Arguments as required by ghc -F -pgmF.