| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Drasil.Build.Artifacts.Legacy
Synopsis
- class HasPathAndDoc a b | a -> b where
- blank :: Doc
- indent :: Doc -> Doc
- indentList :: [Doc] -> Doc
- contSep :: Separator
- filterEmpty :: [Doc] -> [Doc]
- listToDoc :: [String] -> Doc
- type Separator = Doc
- createDirIfMissing :: Bool -> FilePath -> IO ()
- data FileAndContents
- fileAndContents :: FilePath -> Doc -> FileAndContents
- hasPathAndDocToFileAndContents :: HasPathAndDoc a Doc => a -> FileAndContents
- createFile :: FilePath -> String -> IO ()
- data RelativeFile
- relativeFile :: String -> RelativeFile
- relFileToStr :: RelativeFile -> String
Documentation
class HasPathAndDoc a b | a -> b where Source #
Instances
indentList :: [Doc] -> Doc Source #
Indents a list of Docs and combines into one Doc.
createDirIfMissing :: Bool -> FilePath -> IO () Source #
Creates a directory if it does not already exist (optionally with all missing parent directories).
Implementation uses doesPathExist to check if the directory exists rather than createDirectoryIfMissing True, which would create the directory regardless of whether it exists or not, potentially leading to an error that appears in `make debug` logs.
data FileAndContents Source #
The underlying data type for auxiliary files in all renderers.
Instances
fileAndContents :: FilePath -> Doc -> FileAndContents Source #
Constructor for auxiliary files.
hasPathAndDocToFileAndContents :: HasPathAndDoc a Doc => a -> FileAndContents Source #
data RelativeFile Source #
A valid, relative file path with an extension in canonical form.
Instances
| Eq RelativeFile Source # | |
Defined in Drasil.Build.Artifacts.Legacy.FilePath | |
relativeFile :: String -> RelativeFile Source #
Create a RelativeFile given a String that must be in canonical form, be
a valid file path, contain a file extension, and be relative (not absolute);
otherwise, an error is raised.
relFileToStr :: RelativeFile -> String Source #