-
Notifications
You must be signed in to change notification settings - Fork 33
/
double-conversion.cabal
158 lines (142 loc) · 4.52 KB
/
double-conversion.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
cabal-version: 2.2
name: double-conversion
version: 2.0.5.0
license: BSD-2-Clause
license-file: LICENSE
homepage: https://github.com/haskell/double-conversion
bug-reports: https://github.com/haskell/double-conversion/issues
category: Text
author: Bryan O'Sullivan <[email protected]>
maintainer: Bryan O'Sullivan <[email protected]>
stability: experimental
synopsis: Fast conversion between single and double precision floating point and text
build-type: Simple
tested-with: GHC ==9.0.2 || ==9.2.8 || ==9.4.7 || ==9.6.2
description:
A library that performs fast, accurate conversion between
floating point and text.
.
This library is implemented as bindings to the C++
@double-conversion@ library written by Florian Loitsch at Google:
<https://github.com/floitsch/double-conversion>.
.
Now it can convert single precision numbers, and also it can create
Builder, instead of bytestring or text.
.
The 'Text' versions of these functions are about 30 times faster
than the default 'show' implementation for the 'Double' type.
.
The 'ByteString' versions are have very close speed to the 'Text' versions;
.
Builder versions (both for Text and Bytestring) are slower on single value,
but they are much faster on large number of values
(up to 20x faster on list with 20000 doubles).
.
As a final note, be aware that the @bytestring-show@ package is
about 50% slower than simply using 'show'.
extra-source-files:
README.markdown
benchmarks/*.cabal
benchmarks/*.hs
double-conversion/*.cmake.in
double-conversion/AUTHORS
double-conversion/CMakeLists.txt
double-conversion/COPYING
double-conversion/Changelog
double-conversion/LICENSE
double-conversion/Makefile
double-conversion/README
double-conversion/SConstruct
double-conversion/src/*.cc
double-conversion/src/*.h
double-conversion/src/CMakeLists.txt
double-conversion/src/SConscript
double-conversion/test/CMakeLists.txt
double-conversion/test/cctest/*.cc
double-conversion/test/cctest/*.h
double-conversion/test/cctest/CMakeLists.txt
double-conversion/test/cctest/SConscript
include/*.h
tests/*.hs
flag developer
description: operate in developer mode
default: False
manual: True
flag embedded_double_conversion
description: embed the C++ double_conversion library
default: True
library
if impl(ghc >= 9.4)
build-depends: system-cxx-std-lib == 1.0
elif os(darwin) || os(freebsd)
extra-libraries: c++
elif os(windows)
if arch(x86_64) && impl(ghc < 8.6.5)
extra-libraries: stdc++-6 gcc_s_seh-1
elif arch(x86_64)
extra-libraries: stdc++ gcc_s_seh-1
elif impl(ghc >= 8.6.5)
extra-libraries: stdc++ gcc_s_dw2-1
else
extra-libraries: stdc++-6 gcc_s_dw2-1
else
extra-libraries: stdc++
if flag(embedded_double_conversion)
cxx-sources:
cbits/hs-double-conversion-embed.cc
double-conversion/src/bignum.cc
double-conversion/src/bignum-dtoa.cc
double-conversion/src/cached-powers.cc
double-conversion/src/diy-fp.cc
double-conversion/src/double-conversion.cc
double-conversion/src/fast-dtoa.cc
double-conversion/src/fixed-dtoa.cc
double-conversion/src/strtod.cc
include-dirs: double-conversion/src
else
extra-libraries: double-conversion
cxx-sources:
cbits/hs-double-conversion.cc
include-dirs:
include
exposed-modules:
Data.Double.Conversion.Convertable
Data.Double.Conversion.ByteString
Data.Double.Conversion.Text
other-modules:
Data.Double.Conversion.Internal.FFI
Data.Double.Conversion.Internal.ByteString
Data.Double.Conversion.Internal.ByteStringBuilder
Data.Double.Conversion.Internal.Text
Data.Double.Conversion.Internal.TextBuilder
build-depends:
base == 4.*,
bytestring,
ghc-prim,
text >= 0.11.0.8
if flag(developer)
ghc-options: -Werror
ghc-prof-options: -auto-all
else
cc-options: -DNDEBUG
ghc-options: -Wall
default-language: Haskell2010
test-suite tests
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Properties.hs
other-modules: Regressions
ghc-options: -Wall
build-depends:
HUnit,
base,
bytestring,
double-conversion,
test-framework,
test-framework-hunit,
test-framework-quickcheck2,
text
default-language: Haskell2010
source-repository head
type: git
location: https://github.com/haskell/double-conversion