sifflet-lib-1.2.3: Library of modules shared by sifflet and its tests and its exporters.




data SExpr Source


SAtom Atom 
SList [SExpr] 

type Exporter = Functions -> FilePath -> IO ()Source

The type of a function to export (user) functions to a file.

data SchemeOptions Source




defineWithLambda :: Bool

use explicit lambda in function definitions, (define f (lambda (a b) ...)

inl :: Int -> StringSource

Newline and indent

sepLines2 :: [String] -> StringSource

sepLines2 is like sepLines, but adds an extra n between each pair of lines so they are double spaced.

functionsToSExprs :: SchemeOptions -> Functions -> [SExpr]Source

Convert Sifflet Functions to Scheme SExprs

functionsToPrettyScheme :: SchemeOptions -> Functions -> StringSource

Convert Sifflet Functions to pretty Scheme

defToSExpr :: SchemeOptions -> FunctionDefTuple -> SExprSource

Convert a FunctionDefTuple to a Scheme SExpr. Use the form (define (name . args) body) except when there are zero arguments, which becomes a Scheme constant rather than a function, use (define name expr).

exportScheme :: SchemeOptions -> ExporterSource

Export functions to a Scheme file.