| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 01:12:53 GMT
X-Served-By: cache-dfw-kdfw8210101-DFW, cache-bom-vanm7210081-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768612373.267054,VS0,VE293
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
simple-text-format: Simple text based format strings with named identifiers.
[Skip to Readme]
simple-text-format: Simple text based format strings with named identifiers.
A simple library for format strings based on text and attoparsec. See the readme for more details.
[Skip to Readme]
Downloads
- simple-text-format-0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1 |
|---|---|
| Dependencies | attoparsec, base (>=4.7 && <5), text [details] |
| License | BSD-3-Clause |
| Copyright | Copyright: (c) 2017 Justus Adam |
| Author | Justus Adam |
| Maintainer | dev@justus.science |
| Uploaded | by justus at 2017-05-24T12:47:20Z |
| Category | Development, Text |
| Home page | https://github.com/JustusAdam/simple-text-format#readme |
| Source repo | head: git clone https://github.com/JustusAdam/simple-text-format |
| Distributions | NixOS:0.1 |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 1151 total (2 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2017-05-24 [all 1 reports] |
Readme for simple-text-format-0.1
[back to package description]simple-text-format
This library provides a very simple format string syntax with named identifiers based on text and attoparsec.
Syntax for identifiers is ${variable-name}.
Please note that it is whitespace sentitive, meaning ${var] references the variable "var" whereas ${ var} referenced the varaible " var".
The rendering is agnostic to the data structure you use to keep the identifiers.
The formatting function expects simply a function Text -> Maybe Text
There is currently no escaping mechanism, meaning $ parses to "$" but there is no way to get a literal ${.
let formatStr = "A string with ${var} and ${var2}"
let identMap = [("var", "something"), ("var2", "something else")] :: HashMap Text Text
format' formatStr (lookup identMap)
-- A string with something and something else