fay-0.19.1: A compiler for Fay, a Haskell subset that compiles to JavaScript.

Safe HaskellNone



Main library entry point.



module Fay.Types

compileFromTo :: CompileConfig -> FilePath -> Maybe FilePath -> IO ()Source

Compile the given file and write the output to the given path, or if nothing given, stdout.

compileFromToAndGenerateHtml :: CompileConfig -> FilePath -> FilePath -> IO (Either CompileError (String, [Mapping]))Source

Compile the given file and write to the output, also generate any HTML.

toJsName :: String -> StringSource

Convert a Haskell filename to a JS filename.

showCompileError :: CompileError -> StringSource

Print a compile error for human consumption.

getConfigRuntime :: CompileConfig -> IO StringSource

Get the JS runtime source. This will return the user supplied runtime if it exists.

getRuntime :: IO StringSource

Get the default JS runtime source.