Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Fay = Fay {
- snapletFilePath :: FilePath
- verbose :: Bool
- compileMode :: CompileMode
- prettyPrint :: Bool
- _includeDirs :: [FilePath]
- packages :: [String]
- srcDir :: Fay -> FilePath
- destDir :: Fay -> FilePath
- includeDirs :: Fay -> [FilePath]
- data CompileMode
- data CompileResult
- compileFile :: Fay -> FilePath -> IO CompileResult
- compileAll :: Fay -> IO ()
- hasSuffix :: String -> String -> Bool
- filename :: FilePath -> FilePath
- toHsName :: String -> String
- extFiles :: String -> FilePath -> IO [FilePath]
- jsPath :: Fay -> FilePath -> FilePath
- hsPath :: Fay -> FilePath -> FilePath
- jsRelativePath :: FilePath -> FilePath
- hsRelativePath :: FilePath -> FilePath
- verbosePut :: Fay -> String -> IO ()
Documentation
Configuration
Fay | |
|
includeDirs :: Fay -> [FilePath] Source #
Where to check for imports
data CompileMode Source #
Compile on every request or when Snap starts.
data CompileResult Source #
Used by callers of compileFile to get the status of compilation.
compileFile :: Fay -> FilePath -> IO CompileResult Source #
Compile a single file, print errors if they occur and return the | compiled source if successful.
compileAll :: Fay -> IO () Source #
Checks the specified source folder and compiles all new and modified scripts. Also removes any js files whose Fay source has been deleted. All files are checked each request.
extFiles :: String -> FilePath -> IO [FilePath] Source #
Gets the filepath of the files with the given file extension in a folder.
jsPath :: Fay -> FilePath -> FilePath Source #
Convert from the location of a js file to the location of its source hs file.
hsPath :: Fay -> FilePath -> FilePath Source #
Convert from the location of a hs file to the location of the destination js file.
jsRelativePath :: FilePath -> FilePath Source #
Relative path to a js file.
hsRelativePath :: FilePath -> FilePath Source #
Relative path to a hs file.