| 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:13:03 GMT
X-Served-By: cache-dfw-ktki8620049-DFW, cache-bom-vanm7210073-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768612383.081530,VS0,VE302
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
fillit: Flexible string substitution
fillit: Flexible string substitution
Downloads
- fillit-0.1.0.0.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.0.0 |
|---|---|
| Dependencies | base (>=4.7 && <5), data-default, parsec, text, unordered-containers [details] |
| License | BSD-3-Clause |
| Copyright | (c) 2017 ishiy |
| Author | ishiy <y.ishihara.1993@gmail.com> |
| Maintainer | ishiy <y.ishihara.1993@gmail.com> |
| Uploaded | by ishiy at 2017-09-06T21:17:12Z |
| Category | Text |
| Home page | https://github.com/ishiy1993/fillit#readme |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 885 total (3 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-09-06 [all 1 reports] |
Readme for fillit-0.1.0.0
[back to package description]fillit
Flexible String Substitution library
Features
- Support two kinds of substitutions: required and optional.
- You can change the symbols for substitutions.
Note: This library does not support any sanitization.
Usage
Example:
ghci> :set -XOverloadedStrings
ghci> import Data.Text.Fillit
ghci> import qualified Data.HashMap.Lazy as HM
ghci> let dic = HM.fromList [("name", "Tom"), ("age", "22")]
ghci> fill "$name$ (%age%)" dic
Right "Tom (22)"
ghci> fill "$name$ (%school%)" dic
Right "Tom (%school%)"
ghci> fill "$name$ ($school$)" dic
Left "There is no key in dict, such as school"
By default, the symbol $ means a required substitution.
On the other hand, the symbol % means a optional substitution.
These symbols can be changed. See fill'.
Development
$ git clone git@github.com:ishiy1993/fillit.git
$ cd fillit
$ stack build
$ stack test