dhall-1.27.0: A configuration language guaranteed to terminate

Safe HaskellNone
LanguageHaskell2010

Dhall.Util

Description

Shared utility functions

Synopsis

Documentation

snip :: Text -> Text Source #

Utility function to cut out the interior of a large text block

snipDoc :: Doc Ann -> Doc a Source #

Like snip, but for Docs

Note that this has to be opinionated and render ANSI color codes, but that should be fine because we don't use this in a non-interactive context

insert :: Pretty a => a -> Doc Ann Source #

Function to insert an aligned pretty expression

_ERROR :: IsString string => string Source #

Prefix used for error messages

data Censor Source #

Set to Censor if you want to censor error text that might include secrets

Constructors

NoCensor 
Censor 

data Input Source #

Path to input

data Output Source #

Path to output

getExpression :: Censor -> Input -> IO (Expr Src Import) Source #

Convenient utility for retrieving an expression

getExpressionAndHeader :: Censor -> Input -> IO (Text, Expr Src Import) Source #

Convenient utility for retrieving an expression along with its header