exprFromText Parse an expression from Text containing a Dhall program
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Moduledhall-1.42.3Haskell2010
This module contains Dhall's parsing logic
exprFromText Parse an expression from Text containing a Dhall program
Like exprFromText but also returns the leading comments and whitespace (i.e. header) up to the last newline before the code begins
In other words, if you have a Dhall file of the form:
-- Comment 1
{- Comment -} 2Then this will preserve Comment 1, but not Comment 2
This is used by dhall-format to preserve leading comments and whitespace
Replace the source code with spaces when rendering error messages
This utility is used to implement the --censor flag
Create a header with stripped leading spaces and trailing newlines
Parser for a top-level Dhall expression
Deprecated. Support for parsing custom imports will be dropped in a future release
Parser for a top-level Dhall expression. The expression is parameterized over any parseable type, allowing the language to be extended as needed.
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
Eq SrcDefined in dhall-1.42.3 · Dhall.SrcData SrcDefined in dhall-1.42.3 · Dhall.SrcOrd SrcDefined in dhall-1.42.3 · Dhall.SrcShow SrcDefined in dhall-1.42.3 · Dhall.SrcGeneric SrcDefined in dhall-1.42.3 · Dhall.SrcNFData SrcDefined in dhall-1.42.3 · Dhall.SrcPretty SrcDefined in dhall-1.42.3 · Dhall.SrcLift SrcDefined in dhall-1.42.3 · Dhall.Srctype Rep Src = D1 ('MetaData "Src"
"Dhall.Src"
"dhall-1.42.3-5OoAJpk2vIpARwiStLO8GU"
'False) (C1 ('MetaCons "Src"
'PrefixI 'True) (S1 ('MetaSel ('Just "srcStart"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourcePos) :*: (S1 ('MetaSel ('Just "srcEnd"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourcePos) :*: S1 ('MetaSel ('Just "srcText"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))Defined in dhall-1.42.3 · Dhall.SrcAn exception annotated with a Src span
Show e => Show (SourcedException e)Defined in dhall-1.42.3 · Dhall.Parser.CombinatorsException e => Exception (SourcedException e)Defined in dhall-1.42.3 · Dhall.Parser.CombinatorsA parsing error
Show ParseErrorDefined in dhall-1.42.3 · Dhall.ParserException ParseErrorDefined in dhall-1.42.3 · Dhall.ParserA Parser that is almost identical to
Text.Megaparsec.Parsec except treating Haskell-style
comments as whitespace
Monad ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsFunctor ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsMonadFail ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsApplicative ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsAlternative ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsMonadPlus ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsCharParsing ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsParsing ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsTokenParsing ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsMonadParsec Void Text ParserDefined in dhall-1.42.3 · Dhall.Parser.CombinatorsIsString a => IsString (Parser a)Defined in dhall-1.42.3 · Dhall.Parser.CombinatorsSemigroup a => Semigroup (Parser a)Defined in dhall-1.42.3 · Dhall.Parser.Combinators(Semigroup a, Monoid a) => Monoid (Parser a)Defined in dhall-1.42.3 · Dhall.Parser.Combinators