/Prelude-v16.0.0/Text/show

Copy path to clipboard

Examples

show "ABC" ≡ "\"ABC\""
  show
''
${"\u0000"} $ \
${" "}☺''
≡ "\"\\u0000 \\u0024 \\\\ \\n ☺\""

Source

{-
Render a `Text` literal as its own representation as Dhall source code (i.e. a
double-quoted string literal)
-}
let show
: Text → Text
= Text/show

let example0 = assert : show "ABC" ≡ "\"ABC\""

let example1 =
assert
: show
''
${"\u0000"} $ \
${" "}☺''
≡ "\"\\u0000 \\u0024 \\\\ \\n ☺\""

in show