| 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: Fri, 16 Jan 2026 23:48:22 GMT
X-Served-By: cache-dfw-kdal2120020-DFW, cache-bom-vanm7210065-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768607302.423219,VS0,VE376
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
templater: Simple string templater
templater: Simple string templater
Downloads
- templater-0.0.3.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.0.2.0, 0.0.3.0 |
|---|---|
| Dependencies | attoparsec (>=0.12), base (>=4.5 && <5.9), text (>=1.1) [details] |
| Tested with | ghc ==7.6, ghc ==7.8, ghc ==7.10 |
| License | MIT |
| Copyright | Copyright (C) 2015 Geraud Boyer |
| Author | Geraud Boyer |
| Maintainer | Geraud Boyer <geraud@gmail.com> |
| Uploaded | by geraud at 2015-04-30T15:10:49Z |
| Category | Text |
| Home page | https://github.com/geraud/templater |
| Bug tracker | https://github.com/geraud/templater/issues |
| Source repo | head: git clone git://github.com/geraud/templater.git |
| Distributions | NixOS:0.0.3.0 |
| Reverse Dependencies | 1 direct, 1 indirect [details] |
| Downloads | 1644 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 2015-04-30 [all 1 reports] |
Readme for templater-0.0.3.0
[back to package description]Templater
Simple string templater
Installation
cabal update
cabal install templater
Example
{-# LANGUAGE OverloadedStrings #-}
import Data.Text
import qualified Data.Text.IO as TIO
import Text.Templater
main :: IO ()
main = do
let textTemplate = "Hello, %{what is it ?}!"
res = template textTemplate context
case res of
Left error -> do
putStrLn $ "Got Error:" ++ error
Right result -> TIO.putStrLn result
context :: Context -- Context is a type alias for Text -> Maybe Text
context "what is it ?" = Just "world"
context _ = Nothing
renders to Hello, world!
Well that's all there is to it!...