hsc3-0.13: Haskell SuperCollider

Safe HaskellSafe-Inferred

Sound.SC3.UGen.Help

Description

Functions to provide mediated access to the SC3 help system.

Synopsis

Documentation

get_env_default :: String -> String -> IO StringSource

Guarded variant of getEnv with default value.

sc3HelpDirectory :: IO StringSource

Read the environment variable SC3_HELP, the default value is ~/.local/share/SuperCollider/Help.

sc3HelpClassFile :: FilePath -> String -> IO (Maybe FilePath)Source

Locate path to indicated SC3 class help file.

 import System.FilePath

 d <- sc3HelpDirectory
 h <- sc3HelpClassFile d "SinOsc"
 h == Just (d </> "Classes/SinOsc.html")

sc3HelpOperatorEntry :: FilePath -> String -> FilePathSource

Generate path to indicated SC3 operator help file.

 sc3HelpOperatorEntry "." "+" == "./Overviews/Operators.html#.+"

sc3HelpMethod :: FilePath -> Char -> (String, String) -> FilePathSource

Generate path to indicated SC3 method help.

 sc3HelpMethod "." '*' ("C","m") == "./Classes/C.html#*m"

sc3HelpClassMethod :: FilePath -> (String, String) -> FilePathSource

Generate path to indicated SC3 class method help.

 sc3HelpClassMethod "." ("C","m") == "./Classes/C.html#*m"

sc3HelpInstanceMethod :: FilePath -> (String, String) -> FilePathSource

Generate path to indicated SC3 instance method help.

 sc3HelpInstanceMethod "." ("C","m") == "./Classes/C.html#-m"

ugenSC3HelpFile :: String -> IO FilePathSource

The name of the local SC3 Help file documenting u. Deletes @ to allow use on haddock quoted comments.

 import Sound.SC3.UGen.Name

 ugenSC3HelpFile "Collection.*fill"
 ugenSC3HelpFile "Collection.inject"
 ugenSC3HelpFile (toSC3Name "sinOsc")

viewSC3Help :: String -> IO ()Source

Use BROWSER or x-www-browser to view SC3 help file for u.

 import Sound.SC3.UGen.Name

 viewSC3Help (toSC3Name "Collection.*fill")
 viewSC3Help (toSC3Name "Collection.inject")
 viewSC3Help (toSC3Name "sinOsc")