forked from lymar/hastache
/
README.md.ha
61 lines (32 loc) · 1.11 KB
/
README.md.ha
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Hastache
Haskell implementation of [Mustache templates](http://mustache.github.com/)
## Installation
cabal update
cabal install hastache
## Usage
Read [Mustache documentation](http://mustache.github.com/mustache.5.html) for template syntax.
### Examples
#### Variables
{{#example}}variables{{/example}}
{{#runExample}}variables{{/runExample}}
With Generics
{{#example}}variablesGeneric{{/example}}
#### Lists
{{#example}}lists{{/example}}
{{#runExample}}lists{{/runExample}}
With Generics
{{#example}}listsGeneric{{/example}}
Another Generics version
{{#example}}listsGeneric.2{{/example}}
#### Functions
{{#example}}function{{/example}}
{{#runExample}}function{{/runExample}}
#### Monadic functions
{{#example}}monadicFunction{{/example}}
{{#runExample}}monadicFunction{{/runExample}}
#### Generics big example
{{#example}}genericsBig{{/example}}
{{#runExample}}genericsBig{{/runExample}}
#### More examples
* [Hastache test](https://github.com/lymar/hastache/blob/master/tests/test.hs)
* Real world example: [README.md file generator](https://github.com/lymar/hastache/blob/master/mkReadme.hs)