aboutsummaryrefslogtreecommitdiff
path: root/ox-arrays.cabal
diff options
context:
space:
mode:
Diffstat (limited to 'ox-arrays.cabal')
-rw-r--r--ox-arrays.cabal99
1 files changed, 64 insertions, 35 deletions
diff --git a/ox-arrays.cabal b/ox-arrays.cabal
index 515d7ff..be4bb03 100644
--- a/ox-arrays.cabal
+++ b/ox-arrays.cabal
@@ -1,10 +1,23 @@
cabal-version: 3.0
name: ox-arrays
version: 0.1.0.0
-author: Tom Smeding
+synopsis: An efficient CPU-based multidimensional array (tensor) library
+description:
+ An efficient and richly typed CPU-based multidimensional array (tensor)
+ library built upon the optimized tensor representation (strides list)
+ implemented in the orthotope package. See the README.
+
+ If you use this package: let me know (e.g. via email) if you find it useful!
+ Both positive feedback (keep this!) and negative feedback (I needed this but
+ ox-arrays doesn't provide it) is welcome.
+copyright: (c) 2025 Tom Smeding, Mikolaj Konarski
+author: Tom Smeding, Mikolaj Konarski
+maintainer: Tom Smeding <xhackage@tomsmeding.com>
license: BSD-3-Clause
+category: Array, Tensors
build-type: Simple
+extra-doc-files: README.md CHANGELOG.md
extra-source-files: cbits/arith_lists.h
flag trace-wrappers
@@ -12,7 +25,7 @@ flag trace-wrappers
Compile modules that define wrappers around the array methods that trace
their arguments and results. This is conditional on a flag because these
modules make documentation generation fail.
- (https://gitlab.haskell.org/ghc/ghc/-/issues/24964 , should be fixed in
+ (@https://gitlab.haskell.org/ghc/ghc/-/issues/24964@ , should be fixed in
GHC 9.12)
default: False
manual: True
@@ -34,47 +47,64 @@ flag pedantic-c-warnings
default: False
manual: True
+flag default-show-instances
+ description:
+ Use default GHC-derived Show instances for arrays, shapes and indices. This
+ exposes the internal struct-of-arrays representation and is less readable,
+ but can be useful for ox-arrays debugging.
+ default: False
+ manual: True
+
+common basics
+ default-language: Haskell2010
+ ghc-options: -Wall -Wcompat -Widentities -Wunused-packages
+
library
+ import: basics
exposed-modules:
-- put this module on top so ghci considers it the "main" module
Data.Array.Nested
- Data.Array.Mixed.Internal.Arith
- Data.Array.Mixed.Lemmas
- Data.Array.Mixed.Permutation
- Data.Array.Mixed.Shape
- Data.Array.Mixed.Types
- Data.Array.Mixed.XArray
- Data.Array.Nested.Internal.Convert
- Data.Array.Nested.Internal.Mixed
- Data.Array.Nested.Internal.Lemmas
- Data.Array.Nested.Internal.Ranked
- Data.Array.Nested.Internal.Shape
- Data.Array.Nested.Internal.Shaped
+ Data.Array.Nested.Convert
+ Data.Array.Nested.Mixed
+ Data.Array.Nested.Mixed.Shape
+ Data.Array.Nested.Lemmas
+ Data.Array.Nested.Permutation
+ Data.Array.Nested.Ranked
+ Data.Array.Nested.Ranked.Base
+ Data.Array.Nested.Ranked.Shape
+ Data.Array.Nested.Shaped
+ Data.Array.Nested.Shaped.Base
+ Data.Array.Nested.Shaped.Shape
+ Data.Array.Nested.Types
+ Data.Array.Strided.Orthotope
+ Data.Array.XArray
Data.Bag
if flag(trace-wrappers)
exposed-modules:
Data.Array.Nested.Trace
Data.Array.Nested.Trace.TH
+ build-depends:
+ template-haskell
+ other-extensions: TemplateHaskell
+
+ if flag(default-show-instances)
+ cpp-options: -DOXAR_DEFAULT_SHOW_INSTANCES
build-depends:
strided-array-ops,
- base >=4.18 && <4.22,
- deepseq,
+ base,
+ deepseq < 1.7,
ghc-typelits-knownnat,
ghc-typelits-natnormalise,
- orthotope,
- template-haskell,
+ orthotope < 0.2,
vector
hs-source-dirs: src
- default-language: Haskell2010
- ghc-options: -Wall
- other-extensions: TemplateHaskell
-
library strided-array-ops
+ import: basics
exposed-modules:
Data.Array.Strided
Data.Array.Strided.Array
@@ -84,11 +114,11 @@ library strided-array-ops
Data.Array.Strided.Arith.Internal.Lists
Data.Array.Strided.Arith.Internal.Lists.TH
build-depends:
- base,
- ghc-typelits-knownnat,
- ghc-typelits-natnormalise,
- template-haskell,
- vector
+ base >=4.18 && <4.22,
+ ghc-typelits-knownnat < 1,
+ ghc-typelits-natnormalise < 1,
+ template-haskell < 3,
+ vector < 0.14
hs-source-dirs: ops
c-sources: cbits/arith.c
@@ -101,11 +131,10 @@ library strided-array-ops
-- hmatrix assumes sse2, so we can too
cc-options: -msse2
- default-language: Haskell2010
- ghc-options: -Wall
other-extensions: TemplateHaskell
test-suite test
+ import: basics
type: exitcode-stdio-1.0
main-is: Main.hs
other-modules:
@@ -126,20 +155,18 @@ test-suite test
tasty-hedgehog,
vector
hs-source-dirs: test
- default-language: Haskell2010
- ghc-options: -Wall
test-suite example
+ import: basics
type: exitcode-stdio-1.0
main-is: Main.hs
build-depends:
ox-arrays,
base
hs-source-dirs: example
- default-language: Haskell2010
- ghc-options: -Wall
benchmark bench
+ import: basics
type: exitcode-stdio-1.0
main-is: Main.hs
build-depends:
@@ -151,5 +178,7 @@ benchmark bench
tasty-bench,
vector
hs-source-dirs: bench
- default-language: Haskell2010
- ghc-options: -Wall
+
+source-repository head
+ type: git
+ location: https://git.tomsmeding.com/ox-arrays