| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Drasil.FileHandling.Legacy
Synopsis
- blank :: Doc
- indent :: Doc -> Doc
- indentList :: [Doc] -> Doc
- contSep :: Separator
- listToDoc :: [String] -> Doc
- type Separator = Doc
- createDirIfMissing :: Bool -> FilePath -> IO ()
- createFile :: FilePath -> String -> IO ()
- data RelativeFile
- relativeFile :: String -> RelativeFile
- relFileToStr :: RelativeFile -> String
Documentation
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 RelativeFile Source #
A valid, relative file path with an extension in canonical form.
Instances
| Eq RelativeFile Source # | |
Defined in Drasil.FileHandling.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 #