summaryrefslogtreecommitdiff
path: root/pretty-simple.cabal
blob: ecfd38c173685745d3a7fb958b5ee2bdf8d3f51e (plain)
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
name:                pretty-simple
version:             3.1.0.0
synopsis:            pretty printer for data types with a 'Show' instance.
description:         Please see <https://github.com/cdepillabout/pretty-simple#readme README.md>.
homepage:            https://github.com/cdepillabout/pretty-simple
license:             BSD3
license-file:        LICENSE
author:              Dennis Gosnell
maintainer:          cdep.illabout@gmail.com
copyright:           2017-2019 Dennis Gosnell
category:            Text
build-type:          Custom
extra-source-files:  CHANGELOG.md
                   , README.md
                   , img/pretty-simple-example-screenshot.png
cabal-version:       >=1.10

custom-setup
  setup-depends:     base
                   , Cabal
                   , cabal-doctest >=1.0.2

flag buildexe
  description: Build an small command line program that pretty-print anything from stdin.
  default:     False

flag buildexample
  description: Build a small example program showing how to use the pPrint function
  default:     False

library
  hs-source-dirs:      src
  exposed-modules:     Debug.Pretty.Simple
                     , Text.Pretty.Simple
                     , Text.Pretty.Simple.Internal
                     , Text.Pretty.Simple.Internal.Color
                     , Text.Pretty.Simple.Internal.Expr
                     , Text.Pretty.Simple.Internal.ExprParser
                     , Text.Pretty.Simple.Internal.ExprToOutput
                     , Text.Pretty.Simple.Internal.Output
                     , Text.Pretty.Simple.Internal.OutputPrinter
  build-depends:       base >= 4.8 && < 5
                     , ansi-terminal >= 0.6
                     , containers
                     , mtl >= 2.2
                     , text >= 1.2
                     , transformers >= 0.4
  default-language:    Haskell2010
  ghc-options:         -Wall
  other-extensions:    TemplateHaskell

executable pretty-simple
  main-is:             Main.hs
  hs-source-dirs:      app
  build-depends:       base
                     , pretty-simple
                     , text
                     , optparse-applicative
  default-language:    Haskell2010
  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N

  if flag(buildexe)
    buildable:       True
  else
    buildable:       False


executable pretty-simple-example
  main-is:             Example.hs
  other-modules:       Example.Data
  hs-source-dirs:      example
  build-depends:       base
                     , pretty-simple
  default-language:    Haskell2010
  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N

  if flag(buildexample)
    buildable:       True
  else
    buildable:       False

executable pretty-simple-json-example
  main-is:             ExampleJSON.hs
  other-modules:       Example.Data
  hs-source-dirs:      example
  build-depends:       base
                     , aeson
                     , bytestring
                     , pretty-simple
                     , text
  default-language:    Haskell2010
  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N

  if flag(buildexample)
    buildable:       True
  else
    buildable:       False

test-suite pretty-simple-doctest
  type:                exitcode-stdio-1.0
  main-is:             DocTest.hs
  hs-source-dirs:      test
  build-depends:       base
                     , doctest >= 0.13
                     , Glob
                     , QuickCheck
                     , template-haskell
  default-language:    Haskell2010
  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N

benchmark pretty-simple-bench
  type:                exitcode-stdio-1.0
  main-is:             Bench.hs
  other-modules:       Example.Data
  hs-source-dirs:      bench
                     , example
  build-depends:       base
                     , criterion
                     , pretty-simple
                     , text
  default-language:    Haskell2010
  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N

source-repository head
  type:     git
  location: git@github.com:cdepillabout/pretty-simple.git