drasil-build-artifacts-0.1.1.0: A framework for code and document generation for scientific software - build-artifacts SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.Build.Artifacts

Synopsis

Documentation

class HasPathAndDoc a b | a -> b where Source #

Methods

getPath :: a -> FilePath Source #

getDoc :: a -> b Source #

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.

fileAndContents :: FilePath -> Doc -> FileAndContents Source #

Constructor for auxiliary files.

createFile :: FilePath -> String -> IO () Source #

Write a String to a given FilePath.

data RelativeFile Source #

A valid, relative file path with an extension in canonical form.

Instances

Instances details
Eq RelativeFile Source # 
Instance details

Defined in Drasil.Build.Artifacts.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.