forked from Qqwy/haskell-vary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvary.cabal
208 lines (196 loc) · 6.79 KB
/
vary.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
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.35.2.
--
-- see: https://github.com/sol/hpack
name: vary
version: 0.1.1.0
synopsis: Vary: Friendly and fast polymorphic variants (open unions/coproducts/extensible sums)
description: Vary: Friendly and fast Variant types for Haskell
.
Just like tuples are a version of a user-defined product type (only without the field names), a Variant is a version of a user-defined sum type (but without the field names).
.
Variant types are the generalization of `Either`. Especially in the situation where you want to handle multiple errors, Variant types are a great abstraction to use.
.
Variant types are sometimes called '_polymorphic_ variants' for disambiguation. They are also commonly known as (open) unions, coproducts or extensible sums.
.
Vary is lightweight on dependencies. With all library flags turned off, it only depends on `base` and `deepseq`.
.
Please see the full README below or on GitHub at <https://github.com/qqwy/haskell-vary#readme>
category: Data, Data Structures, Error Handling
homepage: https://github.com/qqwy/haskell-vary#readme
bug-reports: https://github.com/qqwy/haskell-vary/issues
author: Marten Wijnja (Qqwy)
maintainer: qqwy@gmx.com
copyright: 2024 Marten Wijnja (Qqwy)
license: MIT
license-file: LICENSE
build-type: Simple
extra-source-files:
README.md
CHANGELOG.md
source-repository head
type: git
location: https://github.com/qqwy/haskell-vary
flag aeson
description: When enabled implements the @FromJSON@/@ToJSON@ typeclasses from the aeson library. When disabled, does not depend on the aeson library.
manual: True
default: True
flag binary
description: When enabled implements the @Binary@ typeclass from the binary library. When disabled, does not depend on the binary library.
manual: True
default: True
flag cereal
description: When enabled implements the @Serialize@ typeclass from the cereal library. When disabled, does not depend on the cereal library.
manual: True
default: True
flag hashable
description: When enabled implements the @Hashable@ typeclass from the hashable library. When disabled, does not depend on the @hashable@ library.
manual: True
default: True
flag quickcheck
description: When enabled implements the @Arbitrary@ typeclasses from the QuickCheck library. When disabled, does not depend on the QuickCheck library.
manual: True
default: True
library
exposed-modules:
Vary
Vary.Utils
Vary.VEither
other-modules:
Vary.Core
hs-source-dirs:
src
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
build-depends:
base >=4.7 && <5
, deepseq >=1.4.0 && <1.6
default-language: Haskell2010
if flag(hashable)
cpp-options: -DFLAG_HASHABLE
build-depends:
hashable >=1.3.0 && <1.6
if flag(aeson)
cpp-options: -DFLAG_AESON
build-depends:
aeson >=2.0.0 && <2.3
if flag(binary)
cpp-options: -DFLAG_BINARY
build-depends:
binary >=0.8.0.0 && <0.9.0.0
if flag(cereal)
cpp-options: -DFLAG_CEREAL
build-depends:
cereal >=0.5.0.0 && <0.6.0.0
if flag(quickcheck)
cpp-options: -DFLAG_QUICKCHECK
build-depends:
QuickCheck >=2.12 && <2.16
test-suite doctests
type: exitcode-stdio-1.0
main-is: doctests.hs
other-modules:
Paths_vary
hs-source-dirs:
test/doctest
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, deepseq >=1.4.0 && <1.6
, doctest-parallel
, vary
default-language: Haskell2010
if flag(hashable)
cpp-options: -DFLAG_HASHABLE
build-depends:
hashable >=1.3.0 && <1.6
if flag(aeson)
cpp-options: -DFLAG_AESON
build-depends:
aeson >=2.0.0 && <2.3
if flag(binary)
cpp-options: -DFLAG_BINARY
build-depends:
binary >=0.8.0.0 && <0.9.0.0
if flag(cereal)
cpp-options: -DFLAG_CEREAL
build-depends:
cereal >=0.5.0.0 && <0.6.0.0
if flag(quickcheck)
cpp-options: -DFLAG_QUICKCHECK
build-depends:
QuickCheck >=2.12 && <2.16
test-suite readme
type: exitcode-stdio-1.0
main-is: test/README.lhs
other-modules:
Paths_vary
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -pgmL markdown-unlit -Wno-deferred-type-errors -Wno-missing-signatures -Wno-unused-matches -Wno-redundant-constraints -Wno-unused-imports -Wno-missing-export-lists
build-tool-depends:
markdown-unlit:markdown-unlit
build-depends:
base >=4.7 && <5
, deepseq >=1.4.0 && <1.6
, hspec
, markdown-unlit
, should-not-typecheck
, vary
default-language: Haskell2010
if flag(hashable)
cpp-options: -DFLAG_HASHABLE
build-depends:
hashable >=1.3.0 && <1.6
if flag(aeson)
cpp-options: -DFLAG_AESON
build-depends:
aeson >=2.0.0 && <2.3
if flag(binary)
cpp-options: -DFLAG_BINARY
build-depends:
binary >=0.8.0.0 && <0.9.0.0
if flag(cereal)
cpp-options: -DFLAG_CEREAL
build-depends:
cereal >=0.5.0.0 && <0.6.0.0
if flag(quickcheck)
cpp-options: -DFLAG_QUICKCHECK
build-depends:
QuickCheck >=2.12 && <2.16
test-suite vary-test
type: exitcode-stdio-1.0
main-is: spec.hs
other-modules:
Paths_vary
hs-source-dirs:
test/spec
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
build-depends:
QuickCheck >=2.12 && <2.15
, aeson >=2.0.0 && <2.3
, base >=4.7 && <5
, binary
, bytestring
, cereal
, deepseq >=1.4.0 && <1.6
, hspec
, vary
default-language: Haskell2010
if flag(hashable)
cpp-options: -DFLAG_HASHABLE
build-depends:
hashable >=1.3.0 && <1.6
if flag(aeson)
cpp-options: -DFLAG_AESON
build-depends:
aeson >=2.0.0 && <2.3
if flag(binary)
cpp-options: -DFLAG_BINARY
build-depends:
binary >=0.8.0.0 && <0.9.0.0
if flag(cereal)
cpp-options: -DFLAG_CEREAL
build-depends:
cereal >=0.5.0.0 && <0.6.0.0
if flag(quickcheck)
cpp-options: -DFLAG_QUICKCHECK
build-depends:
QuickCheck >=2.12 && <2.16