| Agda-2.2.6: A dependently typed functional programming language and proof assistant | Source code | Contents | Index

Agda.Utils.String

Synopsis

quote :: String -> String
showIndex :: Integral i => i -> String
addFinalNewLine :: String -> String
indent :: Integral i => i -> String -> String

Documentation

quote :: String -> String | Source

`quote` adds double quotes around the string, and escapes double quotes and backslashes within the string. This is different from the behaviour of `show`:

     > putStrLn $ show "\x2200"
     "\8704"
     > putStrLn $ quote "\x2200"
     "∀"

(The code examples above have been tested using version 4.2.0.0 of the base library.)

showIndex :: Integral i => i -> String | Source

Shows a non-negative integer using the characters - instead of 0-9.

addFinalNewLine :: String -> String | Source

Adds a final newline if there is not already one.

indent :: Integral i => i -> String -> String | Source

Indents every line the given number of steps.
Produced by Haddock version 2.4.2