char package:dhall
A variation on
char that doesn't quote the expected token in
error messages
This type determines whether to render code as
ASCII or
Unicode
Returns
True if the given
Char is valid within an
unquoted path component
This is exported for reuse within the
Dhall.Parser.Token module
Detect which character set is used for the syntax of an expression If
any parts of the expression uses the Unicode syntax, the whole
expression is deemed to be using the Unicode syntax.
Pretty-print an
Expr using the given
CharacterSet.
prettyCharacterSet largely ignores
Notes.
Notes
do however matter for the layout of let-blocks:
>>> let inner = Let (Binding Nothing "x" Nothing Nothing Nothing (NaturalLit 1)) (Var (V "x" 0)) :: Expr Src ()
>>> prettyCharacterSet ASCII (Let (Binding Nothing "y" Nothing Nothing Nothing (NaturalLit 2)) inner)
let y = 2 let x = 1 in x
>>> prettyCharacterSet ASCII (Let (Binding Nothing "y" Nothing Nothing Nothing (NaturalLit 2)) (Note (Src unusedSourcePos unusedSourcePos "") inner))
let y = 2 in let x = 1 in x
This means the structure of parsed let-blocks is preserved.