Safe Haskell | None |
---|---|
Language | Haskell2010 |
Shared utility functions
Synopsis
- snip :: Text -> Text
- snipDoc :: Doc Ann -> Doc a
- insert :: Pretty a => a -> Doc Ann
- _ERROR :: IsString string => string
- data Censor
- data Input
- data Output
- getExpression :: Censor -> Input -> IO (Expr Src Import)
- getExpressionAndHeader :: Censor -> Input -> IO (Header, Expr Src Import)
- getExpressionAndHeaderFromStdinText :: Censor -> Text -> IO (Header, Expr Src Import)
- newtype Header = Header Text
Documentation
Set to Censor
if you want to censor error text that might include secrets
getExpression :: Censor -> Input -> IO (Expr Src Import) Source #
Convenient utility for retrieving an expression
getExpressionAndHeader :: Censor -> Input -> IO (Header, Expr Src Import) Source #
Convenient utility for retrieving an expression along with its header
getExpressionAndHeaderFromStdinText :: Censor -> Text -> IO (Header, Expr Src Import) Source #
Convenient utility for retrieving an expression along with its header from | text already read from STDIN (so it's not re-read)
A header corresponds to the leading comment at the top of a Dhall file.
The header includes comment characters but is stripped of leading spaces and trailing newlines