copar.cabal 10.2 KB
Newer Older
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
1
name:                copar
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
2
3
4
version:             0.1.0.0
-- synopsis:
-- description:
5
6
license:             GPL-3
license-file:        LICENSE
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
7
8
9
10
author:              Hans-Peter Deifel
maintainer:          hans-peter.deifel@fau.de
-- copyright:
-- category:
11
12
build-type:          Custom
cabal-version:       >=1.24
13

14
15
16
custom-setup
  setup-depends:
    base, Cabal, cabal-doctest >= 1.0.2 && <1.1
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
17

18
19
20
21
flag release
  description:         Disable sanity checks for more speed and less safety
  default:             False

Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
22
23
24
library
  hs-source-dirs:      src
  exposed-modules:     Data.MorphismEncoding
25
26
                     , Data.RefinablePartition
                     , Data.Vector.Unboxed.Mutable.Utils
27
                     , Data.Vector.Utils
28
                     , Data.Algorithm.PossibleMajorityCandidate
29
                     , Data.BlockQueue
30
                     , Data.Partition
31
                     , Data.Partition.Common
32
                     , Data.OpenUnion
33
                     , Data.Float.Utils
34
                     , Data.List.Utils
35
                     , Data.Text.Prettyprint
36
                     , Data.SumBag
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
                     , Copar.RefinementInterface
                     , Copar.Functors
                     , Copar.FunctorDescription
                     , Copar.Functors.Powerset
                     , Copar.Functors.Bag
                     , Copar.Functors.GroupValued
                     , Copar.Functors.MonoidValued
                     , Copar.Functors.Distribution
                     , Copar.Functors.Polynomial
                     , Copar.Functors.AbsorbingPolynomial
                     , Copar.Functors.SomeFunctor
                     , Copar.Parser
                     , Copar.Parser.Lexer
                     , Copar.Parser.Types
                     , Copar.Algorithm
                     , Copar.Algorithm.Types
                     , Copar.Algorithm.Initialize
                     , Copar.Algorithm.Split
                     , Copar.FunctorExpression.Type
                     , Copar.FunctorExpression.Parser
                     , Copar.FunctorExpression.Pretty
                     , Copar.FunctorExpression.Sorts
                     , Copar.FunctorExpression.Desorting
                     , Copar.FunctorExpression.Transform
                     , Copar.Coalgebra.Parser
                     , Copar.Coalgebra.Parser.Class
                     , Copar.Coalgebra.Parser.Internal
                     , Copar.PartitionPrinter
                     , Copar.Dot
                     , Copar.PrettyShow
                     , Copar.RewriteFunctors
68
                     , Copar.Timing
69
70
71
72
73
74
75
76
77
  default-extensions:  GADTs
                     , StandaloneDeriving
                     , DeriveFunctor
                     , DeriveFoldable
                     , DeriveTraversable
                     , TypeFamilies
                     , InstanceSigs
                     , OverloadedStrings
                     , TupleSections
78
                     , LambdaCase
79
80
81
                     , ScopedTypeVariables
                     , TypeApplications
                     , RankNTypes
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
82
  default-language:    Haskell2010
83
  build-depends:       base >= 4.11
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
84
                     , bytestring
85
                     , containers
86
                     , deepseq
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
87
                     , deriving-compat
88
                     , extra
89
                     , ieee754 >= 0.8.0 && <0.9
90
91
92
93
94
95
96
97
                     , megaparsec >= 7 && <8
                     , microlens
                     , microlens-platform
                     , microlens-th
                     , mtl
                     , prettyprinter >= 1.2.1
                     , prettyprinter-ansi-terminal >= 1.1.1.2
                     , primitive >= 0.6.4 && <0.7
98
                     , scientific >= 0.3.6 && < 0.4
99
100
101
102
103
                     , text
                     , unordered-containers
                     , vector
                     , vector-algorithms
                     , vector-th-unbox >= 0.2 && <0.3
104
  ghc-options:         -Wall -Wno-name-shadowing
105
  if flag(release)
106
    cpp-options:       -DRELEASE
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
107

Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
108
executable copar
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
109
  main-is:             Main.hs
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
110
  build-depends:       base >=4.11 && <4.13
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
111
112
  hs-source-dirs:      src/main
  default-language:    Haskell2010
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
113
  build-depends:       copar
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
114
115
116
117
                     , containers
                     , text
                     , vector
                     , bytestring
118
                     , deepseq
119
                     , optparse-applicative
120
                     , json
121
                     , scientific >= 0.3.6 && < 0.4
122
123
124
                     , prettyprinter
                     , prettyprinter-ansi-terminal
                     , prettyprinter-convert-ansi-wl-pprint
125
                     , pretty-show >= 1.7 && <1.10
126
127
128
129
130
131
132

test-suite spec
  type:                exitcode-stdio-1.0
  hs-source-dirs:      tests
  main-is:             Spec.hs
  other-modules:       Data.RefinablePartitionSpec
                     , Data.Vector.Unboxed.Mutable.UtilsSpec
133
                     , Data.Algorithm.PossibleMajorityCandidateSpec
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
134
                     , Data.BlockQueueSpec
135
                     , Data.PartitionSpec
136
                     , Data.OpenUnionSpec
137
                     , Data.List.UtilsSpec
138
                     , Data.Float.UtilsSpec
139
                     , Data.SumBagSpec
140
141
142
143
144
145
146
147
148
149
150
151
152
153
                     , Copar.Functors.PowersetSpec
                     , Copar.Functors.GroupValuedSpec
                     , Copar.Functors.BagSpec
                     , Copar.Functors.DistributionSpec
                     , Copar.Functors.PolynomialSpec
                     , Copar.Functors.MonoidValuedSpec
                     , Copar.Functors.AbsorbingPolynomialSpec
                     , Copar.FunctorExpression.ParserSpec
                     , Copar.FunctorExpression.PrettySpec
                     , Copar.FunctorExpression.SortsSpec
                     , Copar.Coalgebra.ParserSpec
                     , Copar.Parser.LexerSpec
                     , Copar.Algorithm.InitializeSpec
                     , Copar.Algorithm.SplitSpec
154
  default-language:    Haskell2010
155
156
157
158
159
160
161
162
163
  default-extensions:  GADTs
                     , StandaloneDeriving
                     , DeriveFunctor
                     , DeriveFoldable
                     , DeriveTraversable
                     , TypeFamilies
                     , InstanceSigs
                     , OverloadedStrings
                     , TupleSections
164
165
166
                     , ScopedTypeVariables
                     , TypeApplications
                     , RankNTypes
167
  build-depends:       base >= 4.11
168
169
170
                     , hspec
                     , QuickCheck
                     , vector
171
                     , vector-algorithms
172
173
                     , bytestring
                     , text
174
175
                     , megaparsec >= 7 && <8
                     , hspec-megaparsec >= 2.0 && <2.1
176
                     , microlens-platform
177
178
                     , unordered-containers
                     , containers
179
                     , mtl
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
180
                     , copar
181
  build-tool-depends: hspec-discover:hspec-discover ==2.*
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
182
183
184
185
186
187

test-suite doctests
  type:                exitcode-stdio-1.0
  hs-source-dirs:      tests
  main-is:             DocTests.hs
  default-language:    Haskell2010
188
  build-depends:       base >= 4.11
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
189
                     , copar
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
190
                     , doctest
191
192
193
194
195
196

test-suite examples
  type:                exitcode-stdio-1.0
  hs-source-dirs:      tests
  main-is:             Examples.hs
  default-language:    Haskell2010
197
  build-depends:       base >= 4.11
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
198
                     , copar
199
200
201
                     , hspec
                     , directory
                     , text
202
                     , extra
203
204
205
206
207

benchmark bench
  type:                exitcode-stdio-1.0
  hs-source-dirs:      bench
  main-is:             BenchMain.hs
208
209
210
  other-modules:       Copar.Coalgebra.BenchParser
                     , Copar.Functors.BenchGroupValued
                     , Copar.Parser.BenchLexer
211
                     , Data.List.BenchUtils
212
                     , Copar.Algorithm.BenchInitialize
213
                     , Data.BenchRefinablePartition
214
                     , Data.BenchBlockQueue
215
216
217
218
219
220
221
222
223
224
225
226
  default-extensions:  GADTs
                     , StandaloneDeriving
                     , DeriveFunctor
                     , DeriveFoldable
                     , DeriveTraversable
                     , TypeFamilies
                     , InstanceSigs
                     , OverloadedStrings
                     , TupleSections
                     , ScopedTypeVariables
                     , TypeApplications
                     , RankNTypes
227
  build-depends:       base >= 4.11
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
228
                     , copar
229
230
                     , criterion
                     , text
231
                     , megaparsec >= 7 && <8
232
                     , deepseq
233
234
                     , vector
                     , mtl
235
236
  default-language:    Haskell2010
  ghc-options:         -Wall
237
238
239

executable prism-converter
  hs-source-dirs:      src/prism-converter
240
241
242
  main-is:             Main.hs
  other-modules:       Parser
                     , MarkovChain
243
                     , Mdp
244
                     , StatesFile
245
  default-language:    Haskell2010
246
  build-depends:       base >= 4.11
247
                     , text
248
                     , vector
249
                     , megaparsec >= 7
250
                     , containers
251
252
253
254
                     , optparse-applicative
                     , prettyprinter
                     , prettyprinter-ansi-terminal
                     , prettyprinter-convert-ansi-wl-pprint
255
256
257
                     , microlens
                     , microlens-th
                     , microlens-platform
258
259
260
261
262
263
264

executable random-dfa
  hs-source-dirs:      src/random-dfa
  main-is:             Main.hs
  other-modules:       Type
                     , CoalgOutput
                     , DotOutput
265
                     , ValmariOutput
266
267
268
  default-language:    Haskell2010
  default-extensions:  OverloadedStrings
                     , LambdaCase
269
270
271
                     , MultiParamTypeClasses
                     , FlexibleInstances
                     , FunctionalDependencies
272
  build-depends:       base >= 4.11
273
274
275
276
277
278
                     , vector
                     , microlens
                     , microlens-th
                     , microlens-platform
                     , random
                     , text
279
                     , optparse-applicative