copilot-c99-3.2: A compiler for Copilot targeting C99.
Safe HaskellSafe-Inferred




type FunEnv = ([Decln], [Ident]) Source #

statetell :: Monoid m => m -> State m () Source #

tell equivalent for State.

fresh :: String -> [String] -> String Source #

Generate fresh variable name based on a given one.

names :: [Decln] -> [String] Source #

Collect all the names from a list of C99 declarations.

streamname :: Id -> String Source #

Turn a stream id into a suitable C variable name.

indexname :: Id -> String Source #

Turn a stream id into the global varname for indices.

excpyname :: String -> String Source #

Add a postfix for copies of external variables the name.

generatorname :: Id -> String Source #

Turn stream id into name of its generator function.

guardname :: String -> String Source #

Turn a the name of a trigger into a guard generator.

argname :: String -> Int -> String Source #

Turn a trigger name into a an trigger argument name.

argnames :: String -> [String] Source #

Enumerate all argument names based on trigger name.