-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathsubhask.cabal
225 lines (191 loc) · 6.13 KB
/
subhask.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
name: subhask
version: 0.1.1.0
synopsis: Type safe interface for programming in subcategories of Hask
homepage: http://github.com/mikeizbicki/subhask
license: BSD3
license-file: LICENSE
author: Mike Izbicki
maintainer: [email protected]
category: Control, Categories, Algebra
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.10
description:
SubHask is a radical rewrite of the Haskell <https://www.haskell.org/onlinereport/standard-prelude.htm Prelude>.
The goal is to make numerical computing in Haskell fun and fast.
The main idea is to use a type safe interface for programming in arbitrary subcategories of <https://wiki.haskell.org/Hask Hask>.
For example, the category <http://ncatlab.org/nlab/show/Vect Vect> of linear functions is a subcategory of Hask, and SubHask exploits this fact to give a nice interface for linear algebra.
To achieve this goal, almost every class hierarchy is redefined to be more general.
I recommend reading the <http://github.com/mikeizbicki/subhask/blob/master/README.md README> file and the <http://github.com/mikeizbicki/subhask/blob/master/examples examples> before looking at the documentation here.
source-repository head
type: git
location: http://github.com/mikeizbicki/subhask
--------------------------------------------------------------------------------
Flag LlvmSupport
Description: whether to -fllvm
Default: True
-- needed to be turned off in travis.
-- see https://github.com/travis-ci/travis-ci/issues/6120
Flag DoTestOptimise
Description: whether to -O2 test
Default: False
-- full optimised compilation takes a bit, and is turned off by default for the test suite.
-- Note: still on for the bench suite, where it doesn't take long.
library
exposed-modules:
SubHask
SubHask.Algebra
SubHask.Algebra.Array
SubHask.Algebra.Container
SubHask.Algebra.Group
SubHask.Algebra.Logic
SubHask.Algebra.Matrix
SubHask.Algebra.Metric
SubHask.Algebra.Ord
SubHask.Algebra.Parallel
SubHask.Algebra.Ring
SubHask.Algebra.Vector
SubHask.Algebra.Vector.FFI
SubHask.Category
SubHask.Category.Finite
SubHask.Category.Product
SubHask.Category.Polynomial
SubHask.Category.Slice
SubHask.Category.Trans.Bijective
SubHask.Category.Trans.Constrained
SubHask.Category.Trans.Derivative
SubHask.Category.Trans.Monotonic
SubHask.Compatibility.Base
SubHask.Compatibility.BloomFilter
SubHask.Compatibility.ByteString
SubHask.Compatibility.Cassava
SubHask.Compatibility.Containers
SubHask.Compatibility.HyperLogLog
SubHask.Monad
SubHask.Mutable
SubHask.SubType
SubHask.TemplateHaskell.Base
SubHask.TemplateHaskell.Deriving
SubHask.TemplateHaskell.Mutable
SubHask.TemplateHaskell.Test
other-modules:
SubHask.Internal.Prelude
SubHask.TemplateHaskell.Common
default-extensions:
TypeFamilies,
ConstraintKinds,
DataKinds,
GADTs,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts,
TypeOperators,
RankNTypes,
InstanceSigs,
ScopedTypeVariables,
UndecidableInstances,
PolyKinds,
StandaloneDeriving,
GeneralizedNewtypeDeriving,
TemplateHaskell,
BangPatterns,
FunctionalDependencies,
TupleSections,
MultiWayIf,
AutoDeriveTypeable,
DeriveGeneric,
RebindableSyntax
hs-source-dirs:
src
c-sources:
cbits/Lebesgue.c
cc-options:
-ffast-math
-msse3
ghc-options:
-funbox-strict-fields
-Wall
build-depends:
-- haskell language
base >= 4.8 && <4.9,
ghc-prim,
template-haskell,
-- special functionality
parallel,
deepseq,
primitive,
monad-primitive,
QuickCheck,
-- math
erf,
gamma,
hmatrix,
-- compatibility control flow
mtl,
MonadRandom,
-- compatibility data structures
bytestring,
bloomfilter,
cassava,
containers,
vector,
array,
hyperloglog,
reflection,
-- required for hyperloglog compatibility
semigroups,
bytes,
approximate,
lens
default-language:
Haskell2010
--------------------------------------------------------------------------------
Test-Suite test
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: TestSuite.hs
build-depends:
subhask,
test-framework-quickcheck2,
test-framework
if flag(dotestoptimise)
ghc-options: -O2
if flag(llvmsupport)
ghc-options: -fllvm
benchmark bench
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: bench
main-is: Vector.hs
build-depends:
base,
subhask,
criterion,
MonadRandom
ghc-options:
-O2
-funbox-strict-fields
-fexcess-precision
-optlo-O3
-optlo-enable-fp-mad
-optlo-enable-no-infs-fp-math
-optlo-enable-no-nans-fp-math
-optlo-enable-unsafe-fp-math
if flag(llvmsupport)
ghc-options: -fllvm
executable Example0001
default-language: Haskell2010
hs-source-dirs: examples
main-is: example0001-polynomials.lhs
build-depends: subhask, base
executable Example0002
default-language: Haskell2010
hs-source-dirs: examples
main-is: example0002-monad-instances-for-set.lhs
build-depends: subhask, base
executable Example0003
default-language: Haskell2010
hs-source-dirs: examples
main-is: example0003-linear-algebra.lhs
build-depends: subhask, base