-
Notifications
You must be signed in to change notification settings - Fork 2
/
posit.cabal
155 lines (132 loc) · 3.78 KB
/
posit.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
cabal-version: 1.12
name: posit
version: 2022.2.0.0
category: Numeric, Math
description: The Posit Number format attempting to conform to the Posit Standard Versions 3.2 and 2022. Where Real numbers are approximated by `Maybe Rational` and sampled in a similar way to the projective real line.
homepage: https://github.com/waivio/posit#readme
bug-reports: https://github.com/waivio/posit/issues
author: Nathan Waivio
maintainer: [email protected]
copyright: 2021-2023 Nathan Waivio
license: BSD3
license-file: LICENSE
build-type: Simple
tested-with: GHC == 8.10.7,
GHC == 9.0.2,
GHC == 9.2.8,
GHC == 9.4.8,
GHC == 9.6.3
-- fails rewrite rules with ghc-9.6.3 bummer
-- Things before ghc-8.10.7 fail, don't care!
synopsis: Posit Numbers
extra-source-files:
README.md
ChangeLog.md
stack.yaml
source-repository head
type: git
location: https://github.com/waivio/posit
flag do-no-storable-random
description: Build without Storable or Random/Uniform Class support
manual: True
default: False
flag do-liquid
description: Build with Liquid Haskell checking
manual: True
default: False
flag do-rewrite
description: Build with Rewrite Rules for Fused Operations.
manual: True
default: False
library
exposed-modules:
Posit
Posit.Internal.PositC
hs-source-dirs:
src
build-depends:
data-dword,
scientific
default-language: Haskell2010
-- Compiler options
ghc-options: -Wall -O2
if flag(do-rewrite)
cpp-options: -DO_REWRITE
ghc-options: -fforce-recomp -ddump-rule-firings
if flag(do-liquid)
ghc-options: -fplugin=LiquidHaskell -fplugin-opt=LiquidHaskell:--fast -fplugin-opt=LiquidHaskell:--no-termination -fplugin-opt=LiquidHaskell:--max-case-expand=4 -fplugin-opt=LiquidHaskell:--short-names
if flag(do-no-storable-random)
cpp-options: -DO_NO_STORABLE_RANDOM
if flag(do-liquid)
cpp-options: -DO_LIQUID -DO_NO_STORABLE_RANDOM
-- Other library packages from which modules are imported.
build-depends:
deepseq >=1.1 && <2
if !flag(do-liquid)
build-depends:
base >=4.7 && <5
if !flag(do-no-storable-random)
build-depends:
random
if flag(do-liquid)
build-depends:
liquid-base,
liquidhaskell
-- perhaps one day: -threaded -rtsopts -with-rtsopts=-N
test-suite posit-test
type: exitcode-stdio-1.0
main-is: TestPosit.hs
other-modules:
Test.Algorithms
hs-source-dirs:
test
ghc-options: -O2
build-depends:
base >=4.7 && <5,
posit
default-language: Haskell2010
test-suite test-posit-functions
type: exitcode-stdio-1.0
main-is: TestElementaryFunctions.hs
hs-source-dirs:
test
ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N
cpp-options: -DO_REWRITE
build-depends:
base >= 4.7 && < 5,
posit >= 2022.0.1,
Chart,
Chart-cairo
default-language: Haskell2010
-- Weigh based benchmark for Vector
benchmark test-posit-weigh
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: WeighPosit.hs
ghc-options: -Wall -O2
build-depends:
base >= 4.7 && < 5,
posit,
vector,
weigh
default-language: Haskell2010
-- Test `(show.read == id)`
benchmark test-posit-readShowId
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: TestReadShow.hs
ghc-options: -Wall -O2
build-depends:
base >= 4.7 && < 5,
posit
default-language: Haskell2010
-- Test the Rewrite Rules for FusedOps
benchmark test-posit-fusedRewrite
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: TestFusedRewrite.hs
ghc-options: -Wall -O2
build-depends:
base >= 4.7 && < 5,
posit
default-language: Haskell2010