File: prettyprinter.cabal

package info (click to toggle)
haskell-prettyprinter 1.7.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 368 kB
  • sloc: haskell: 2,453; ansic: 16; makefile: 3
file content (236 lines) | stat: -rw-r--r-- 6,987 bytes parent folder | download | duplicates (3)
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
name:                prettyprinter
version:             1.7.1
cabal-version:       >= 1.10
category:            User Interfaces, Text
synopsis:            A modern, easy to use, well-documented, extensible pretty-printer.
description:         A modern, easy to use, well-documented, extensible pretty-printer. For more see README.md
license:             BSD2
license-file:        LICENSE.md
extra-source-files:  README.md
                   , CHANGELOG.md
                   , misc/version-compatibility-macros.h
author:              Phil Wadler, Daan Leijen, Max Bolingbroke, Edward Kmett, David Luposchainsky, Simon Jakobi
maintainer:          Simon Jakobi <simon.jakobi@gmail.com>, David Luposchainsky <dluposchainsky at google>
bug-reports:         http://github.com/quchen/prettyprinter/issues
homepage:            http://github.com/quchen/prettyprinter
build-type:          Simple
tested-with:         GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2

source-repository head
    type: git
    location: git://github.com/quchen/prettyprinter.git



library
    exposed-modules:
          Prettyprinter
        , Prettyprinter.Internal
        , Prettyprinter.Internal.Debug
        , Prettyprinter.Internal.Type
        , Prettyprinter.Render.String
        , Prettyprinter.Render.Text
        , Prettyprinter.Render.Tutorials.StackMachineTutorial
        , Prettyprinter.Render.Tutorials.TreeRenderingTutorial
        , Prettyprinter.Render.Util.Panic
        , Prettyprinter.Render.Util.SimpleDocTree
        , Prettyprinter.Render.Util.StackMachine
        , Prettyprinter.Util

        , Prettyprinter.Symbols.Unicode
        , Prettyprinter.Symbols.Ascii

        , Data.Text.Prettyprint.Doc
        , Data.Text.Prettyprint.Doc.Internal
        , Data.Text.Prettyprint.Doc.Internal.Debug
        , Data.Text.Prettyprint.Doc.Internal.Type
        , Data.Text.Prettyprint.Doc.Render.String
        , Data.Text.Prettyprint.Doc.Render.Text
        , Data.Text.Prettyprint.Doc.Render.Tutorials.StackMachineTutorial
        , Data.Text.Prettyprint.Doc.Render.Tutorials.TreeRenderingTutorial
        , Data.Text.Prettyprint.Doc.Render.Util.Panic
        , Data.Text.Prettyprint.Doc.Render.Util.SimpleDocTree
        , Data.Text.Prettyprint.Doc.Render.Util.StackMachine
        , Data.Text.Prettyprint.Doc.Util

        , Data.Text.Prettyprint.Doc.Symbols.Unicode
        , Data.Text.Prettyprint.Doc.Symbols.Ascii

    ghc-options: -Wall -O2
    hs-source-dirs: src
    include-dirs: misc
    default-language: Haskell2010
    other-extensions:
          BangPatterns
        , CPP
        , OverloadedStrings
        , DefaultSignatures
        , ScopedTypeVariables

    build-depends:
          base >= 4.5 && < 5

    if flag(text)
        build-depends: text >= 1.2
    else
        -- A fake text package, emulating the same API, but backed by String
        hs-source-dirs: src-text
        other-modules:
              Data.Text
            , Data.Text.IO
            , Data.Text.Lazy
            , Data.Text.Lazy.Builder

    if !impl(ghc >= 7.6)
        build-depends: ghc-prim

    if impl(ghc >= 8.0)
        ghc-options: -Wcompat
    if !impl(ghc >= 8.0)
        build-depends: semigroups >= 0.17
        build-depends: fail >= 4.9.0.0 && <4.10
    if !impl(ghc >= 7.10)
        build-depends: void >=0.4 && <0.8



Flag buildReadme
  Description: Build the readme generator
  Default:     False

Flag text
  Description: While it's a core value of @prettyprinter@ to use @Text@, there are rare
               circumstances (mostly when @prettyprinter@ arises as a dependency of
               test suites of packages like @bytestring@ or @text@ themselves) when
               this is inconvenient. In this case one can disable this flag, so that
               @prettyprinter@ fallbacks to @String@.
  Default:     True


executable generate_readme
    hs-source-dirs: app
    main-is: GenerateReadme.hs
    build-depends:
          base >= 4.7 && < 5
        , prettyprinter

        , text
        , template-haskell >= 2.9
    default-language: Haskell2010
    other-modules: MultilineTh
    other-extensions: OverloadedStrings
                    , TemplateHaskell
                    , QuasiQuotes
    if flag(buildReadme) && flag(text)
        buildable: True
    else
        buildable: False



test-suite doctest
    type: exitcode-stdio-1.0
    hs-source-dirs: test/Doctest
    main-is: Main.hs
    build-depends:
          base       >= 4.7 && < 5
        , doctest    >= 0.9
        , prettyprinter
        , QuickCheck >= 2.5
    ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
    default-language: Haskell2010
    if impl (ghc < 7.10)
        buildable: False
        -- Doctest does not support searching through directories in old versions

test-suite testsuite
    type: exitcode-stdio-1.0
    hs-source-dirs: test/Testsuite
    main-is: Main.hs
    other-modules: StripTrailingSpace
    build-depends:
          base
        , prettyprinter

        , pgp-wordlist     >= 0.1
        , bytestring
        , quickcheck-instances >= 0.3
        , tasty            >= 0.10
        , tasty-hunit      >= 0.9
        , tasty-quickcheck >= 0.8
        , text
    ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
    default-language: Haskell2010

    if !impl(ghc >= 8.0)
        build-depends: semigroups >= 0.6

    if !flag(text)
        buildable: False


benchmark fusion
    type: exitcode-stdio-1.0
    hs-source-dirs: bench
    main-is: Fusion.hs
    build-depends:
          base >= 4.5 && < 5
        , prettyprinter

        , gauge          >= 0.2
        , mtl            >= 2.1
        , random         >= 1.0
        , text
        , transformers   >= 0.3
        , ansi-wl-pprint >= 0.6
    ghc-options: -Wall -rtsopts
    default-language: Haskell2010
    other-extensions: OverloadedStrings

    if !flag(text)
        buildable: False

benchmark faster-unsafe-text
    build-depends:
          base >= 4.5 && < 5
        , prettyprinter

        , gauge >= 0.2
        , text

    hs-source-dirs:      bench
    main-is:             FasterUnsafeText.hs
    ghc-options:         -rtsopts -Wall
    default-language:    Haskell2010
    type:                exitcode-stdio-1.0

    if !flag(text)
        buildable: False

benchmark large-output
    build-depends:
          base >= 4.5 && < 5
        , base-compat >=0.9.3 && <0.12
        , prettyprinter
        , ansi-wl-pprint

        , gauge >= 0.2
        , QuickCheck >= 2.7
        , containers
        , text
        , deepseq

    hs-source-dirs:      bench
    main-is:             LargeOutput.hs
    ghc-options:         -rtsopts -Wall
    default-language:    Haskell2010
    type:                exitcode-stdio-1.0

    if !impl(ghc >= 7.6)
        build-depends: ghc-prim

    if !impl(ghc >= 8.0)
        build-depends: semigroups

    if !flag(text)
        buildable: False