-
Notifications
You must be signed in to change notification settings - Fork 27
/
inspection-testing.cabal
234 lines (213 loc) · 8.24 KB
/
inspection-testing.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
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
name: inspection-testing
version: 0.5.0.3
synopsis: GHC plugin to do inspection testing
description: Some carefully crafted libraries make promises to their
users beyond functionality and performance.
.
Examples are: Fusion libraries promise intermediate data
structures to be eliminated. Generic programming libraries promise
that the generic implementation is identical to the
hand-written one. Some libraries may promise allocation-free
or branch-free code.
.
Conventionally, the modus operandi in all these cases is
that the library author manually inspects the (intermediate or
final) code produced by the compiler. This is not only
tedious, but makes it very likely that some change, either
in the library itself or the surrounding eco-system,
breaks the library’s promised without anyone noticing.
.
This package provides a disciplined way of specifying such
properties, and have them checked by the compiler. This way,
this checking can be part of the ususal development cycle
and regressions caught early.
.
See the documentation in "Test.Inspection" or the project
webpage for more examples and more information.
category: Testing, Compiler Plugin
homepage: https://github.com/nomeata/inspection-testing
license: MIT
license-file: LICENSE
author: Joachim Breitner
maintainer: mail@joachim-breitner.de
copyright: 2017 Joachim Breitner
build-type: Simple
extra-source-files: ChangeLog.md, README.md
cabal-version: >=1.10
Tested-With: GHC == 8.0.2, GHC == 8.2.*, GHC == 8.4.*, GHC ==8.6.*, GHC ==8.8.*, GHC ==8.10.*, GHC ==9.0.*, GHC ==9.2.*, GHC ==9.4.*, GHC ==9.6.*, GHC ==9.8.*, GHC ==9.10.*
source-repository head
type: git
location: git://github.com/nomeata/inspection-testing.git
library
exposed-modules: Test.Inspection
Test.Inspection.Plugin
Test.Inspection.Core
hs-source-dirs: src
build-depends: base >=4.9 && <4.22
build-depends: ghc >= 8.0.2 && <9.13
build-depends: template-haskell
build-depends: containers
build-depends: transformers
build-depends: mtl
default-language: Haskell2010
ghc-options: -Wall -Wno-name-shadowing
test-suite NS_NP
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: NS_NP.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is NS_NP
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite HPCs
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: HPCs.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is HPCs
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite simple
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: Simple.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is Simple
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite simple-test
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: SimpleTest.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite lets-test
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: LetsTest.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite doesnotuse
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: DoesNotUse.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is DoesNotUse
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite fusion
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: Fusion.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is Fusion
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite generics
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: Generics.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is Generics
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite dictionary
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: Dictionary.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is Dictionary
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite mutual-recursion
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: MutualRecursion.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is MutualRecursion
test-suite regression
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: Regression.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite worker-wrapper
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: WorkerWrapper.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is WorkerWrapper
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
test-suite unsafe-coerce
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: UnsafeCoerce.hs
build-depends: inspection-testing
build-depends: base
default-language: Haskell2010
ghc-options: -main-is UnsafeCoerce
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
flag more-tests
description: Run tests that pull in specific versions of other packages
default: False
test-suite generic-lens
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: GenericLens.hs
if flag(more-tests)
build-depends: inspection-testing
build-depends: base
build-depends: generic-lens ==2.1.0.0
else
buildable: False
default-language: Haskell2010
ghc-options: -main-is GenericLens
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin
flag old-text-tests
description: Run tests that exhibits bug in old text package. Only works with older version of GHC.
default: False
test-suite text
type: exitcode-stdio-1.0
hs-source-dirs: examples
main-is: Text.hs
if flag(old-text-tests)
build-depends: inspection-testing
build-depends: base
build-depends: text ==1.2.2.2
build-depends: bytestring
else
buildable: False
default-language: Haskell2010
ghc-options: -main-is Text
if impl(ghc < 8.4)
ghc-options: -fplugin=Test.Inspection.Plugin