-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmart-math.cabal
More file actions
190 lines (172 loc) · 4.64 KB
/
smart-math.cabal
File metadata and controls
190 lines (172 loc) · 4.64 KB
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
cabal-version: 2.4
name: smart-math
version: 0.1
license: MIT
license-file: LICENSE
tested-with:
GHC ==9.2.8
|| ==9.4.8
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.1
copyright: 2022-2025 Thomas Bidne
author: Thomas Bidne
maintainer: tbidne@protonmail.com
homepage: https://github.com/tbidne/smart-math/
bug-reports: https://github.com/tbidne/smart-math/issues
synopsis: Mathematical smart constructors
description: Provides mathematical smart constructors
category: Math, Numeric
extra-source-files: README.md
extra-doc-files: CHANGELOG.md
source-repository head
type: git
location: https://github.com/tbidne/smart-math
flag arithmoi
description: Uses the much faster arithmoi for primality testing.
default: False
manual: True
common common-lang
default-extensions:
BangPatterns
DataKinds
DeriveAnyClass
DeriveFoldable
DeriveGeneric
DeriveLift
DerivingStrategies
DerivingVia
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
LambdaCase
MultiParamTypeClasses
MultiWayIf
NegativeLiterals
NoStarIsType
NumericUnderscores
OverloadedLabels
OverloadedRecordDot
OverloadedStrings
PatternSynonyms
RankNTypes
ScopedTypeVariables
StandaloneDeriving
StandaloneKindSignatures
TypeApplications
TypeFamilies
TypeOperators
default-language: Haskell2010
if flag(arithmoi)
cpp-options: -DUSE_ARITHMOI
-- NOTE: [TypeAbstractions default extensions]
--
-- We would like to enable TypeAbstractions globally i.e. the below logic,
-- however, that runs afoul of our format job because cabal/cabal-fmt does
-- not recognize the extension yet. We need a greater version of cabal,
-- presumably.
--
-- Until our ci (nix) has a cabal that recognizes TypeAbstractions,
-- enable it in the module.
--
--if impl(ghc >=9.8.1)
-- default-extensions: TypeAbstractions
library
import: common-lang
exposed-modules:
Numeric.Class.Division
Numeric.Data.Fraction
Numeric.Data.Fraction.Internal
Numeric.Data.Internal.Utils
Numeric.Data.Interval
Numeric.Data.Interval.Internal
Numeric.Data.ModN
Numeric.Data.ModN.Internal
Numeric.Data.ModP
Numeric.Data.ModP.Internal
Numeric.Data.ModP.Internal.Primality
Numeric.Data.NonNegative
Numeric.Data.NonNegative.Internal
Numeric.Data.NonZero
Numeric.Data.NonZero.Internal
Numeric.Data.Positive
Numeric.Data.Positive.Internal
build-depends:
, algebra-simple ^>=0.1
, base >=4.16.0.0 && <4.22
, bounds ^>=0.1
, deepseq >=1.4.4.0 && <1.6
, hashable >=1.3.0.0 && <1.6
, optics-core ^>=0.4
, random ^>=1.2.0
, singletons ^>=3.0
, template-haskell >=2.17.0.0 && <2.24
, text >=1.2.4.0 && <2.2
, text-builder-linear ^>=0.1.3
, text-display ^>=1.0.0.0
if flag(arithmoi)
build-depends:
, arithmoi ^>=0.13.0.0
, mod ^>=0.2.0.1
hs-source-dirs: src
ghc-options: -Wmissing-import-lists
executable prime-prof
import: common-lang
main-is: Main.hs
build-depends:
, base
, smart-math
hs-source-dirs: prime-prof
ghc-options: -Wmissing-import-lists
test-suite unit
import: common-lang
type: exitcode-stdio-1.0
main-is: Main.hs
other-modules:
Equality
Gens
Test.Algebra.Additive.AGroup
Test.Algebra.Additive.AMonoid
Test.Algebra.Additive.ASemigroup
Test.Algebra.Multiplicative.MGroup
Test.Algebra.Multiplicative.MMonoid
Test.Algebra.Multiplicative.MSemigroup
Test.Data.Fraction
Test.Data.Interval
Test.Data.ModN
Test.Data.ModP
Test.Data.ModP.Internal
Test.Data.NonNegative
Test.Data.NonZero
Test.Data.Positive
Test.Prelude
Test.TestBounds
Utils
build-depends:
, algebra-simple
, base
, bounds
, deepseq
, hedgehog >=1.0.2 && <1.6
, optics-core
, smart-math
, tasty >=1.1.0.3 && <1.6
, tasty-hedgehog >=1.0.0.2 && <1.5
, tasty-hunit >=0.9 && <0.11
, text
, text-display
hs-source-dirs: test/unit
ghc-options: -threaded -with-rtsopts=-N
benchmark benchmarks
import: common-lang
type: exitcode-stdio-1.0
main-is: Main.hs
build-depends:
, base
, smart-math
, tasty-bench >=0.3 && <0.5
hs-source-dirs: benchmarks
ghc-options: -Wmissing-import-lists