Madlibs DSL for templating text (http://polemic.vmchale.com/madlang)

root / madlang.cabal

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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
cabal-version: >=1.10
name: madlang
version: 4.0.2.6
license: BSD3
license-file: LICENSE
copyright: Copyright: (c) 2016-2018 Vanessa McHale
maintainer: vamchale@gmail.com
author: Vanessa McHale
stability: experimental
homepage: https://hub.darcs.net/vmchale/madlang
synopsis: Randomized templating language DSL
description:
    Madlang is a text templating language written in Haskell,
    meant to explore computational creativity and generative
    literature.
category: Web
build-type: Custom
extra-source-files:
    README.md
    test/templates/*.mad
    test/templates/err/*.mad
    demo/*.mad
    cabal.project.local
    man/madlang.1

source-repository head
    type: darcs
    location: https://hub.darcs.net/vmchale/madlang

custom-setup
    setup-depends: base -any,
                   Cabal -any,
                   cli-setup >=0.1.0.2

flag development
    description:
        Turn on '-Werror'
    default: False
    manual: True

flag library
    description:
        Don't build an executable
    default: False
    manual: True

library
    exposed-modules:
        Text.Madlibs
    hs-source-dirs: src
    other-modules:
        Text.Madlibs.Ana.ParseUtils
        Text.Madlibs.Cata.Run
        Text.Madlibs.Ana.Parse
        Text.Madlibs.Ana.Resolve
        Text.Madlibs.Internal.Types
        Text.Madlibs.Generate.TH
        Text.Madlibs.Internal.Utils
        Text.Madlibs.Cata.SemErr
        Text.Madlibs.Cata.Display
        Text.Madlibs.Packaging.Fetch
    default-language: Haskell2010
    ghc-options: -Wall
    build-depends:
        base >=4.11 && <5,
        megaparsec >=6.0,
        text -any,
        template-haskell -any,
        MonadRandom -any,
        composition-prelude >=1.1.0.0,
        directory -any,
        file-embed -any,
        random-shuffle -any,
        mtl -any,
        ansi-wl-pprint -any,
        containers -any,
        titlecase >=1.0,
        th-lift-instances -any,
        http-client -any,
        http-client-tls -any,
        tar -any,
        zlib -any,
        zip-archive -any,
        recursion-schemes -any,
        binary -any
    
    if flag(development)
        ghc-options: -Werror
    
    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates

executable madlang
    main-is: Main.hs
    hs-source-dirs: app
    other-modules:
        Paths_madlang
    default-language: Haskell2010
    ghc-options: -Wall
    build-depends:
        base >=4.11,
        madlang -any,
        optparse-applicative -any,
        text -any,
        directory -any,
        megaparsec -any
    
    if flag(library)
        buildable: False
    
    if flag(development)
        ghc-options: -Werror
    
    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates

test-suite madlang-test
    type: exitcode-stdio-1.0
    main-is: Spec.hs
    hs-source-dirs: test
    other-modules:
        Demo
    default-language: Haskell2010
    ghc-options: -threaded -rtsopts -Wall -with-rtsopts=-N
    build-depends:
        base -any,
        madlang -any,
        hspec -any,
        text -any,
        hspec-megaparsec -any
    
    if flag(development)
        ghc-options: -Werror
    
    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates

benchmark madlang-bench
    type: exitcode-stdio-1.0
    main-is: Bench.hs
    hs-source-dirs: bench
    default-language: Haskell2010
    build-depends:
        base -any,
        criterion -any,
        madlang -any,
        megaparsec -any,
        text -any
    
    if flag(development)
        ghc-options: -Werror
    
    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates