doc: Move library description to a better home.
[altfloat.git] / altfloat.cabal
blobafa71b908efc854112e239f198c944427c6e5746
1 Name:               altfloat
2 Version:            0.1
3 License:            OtherLicense
4 License-File:       LICENSE
5 Cabal-Version:      >= 1.2
6 Author:             Nick Bowler
7 Maintainer:         nbowler@draconx.ca
8 Stability:          experimental
9 Category:           Numerical
10 Build-Type:         Simple
11 Extra-Source-Files: configure.ac, configure, altfloat.buildinfo.in, cfloat.h
12 Extra-Tmp-Files:    altfloat.buildinfo, config.status config.log, config.cache
13 Synopsis:           Alternative floating point support for GHC.
14 Description:
15     A replacement for the standard Haskell floating point types and supporting
16     functions.  There are a number of shortcomings which I feel severely hinder
17     Haskell's utility for numerical computation.  These shortcomings include
18     .
19     * There is no way to sanely convert between Haskell's floating types -- not
20     even between Double and CDouble.  The implementation of the 'realToFrac'
21     function goes through 'Rational', which loses information as 'Rational'
22     cannot represent all floating point values.
23     .
24     * Making floating types an instance of 'Ord' makes no sense.  'Ord' is for
25     totally ordered data types, which floats are not.  As a result, a number of
26     library functions (such as 'max' and 'sort') produce nonsensical results.
27     .
28     * The 'Enum' instance for floating types similarly makes little sense.
29     While 'fromEnum' and 'toEnum' functions use 'Int' instead of 'Integer',
30     limiting their usefulness, 'pred' and 'succ' can be defined in a much more
31     useful way.
32     .
33     * Functions that should care about negative zeros, such as 'signum' and
34     'abs', do not.
35     .
36     * Some functions, such as 'floor', have nonsensical behaviour for
37     non-finite input.
38     .
39     * The selection of floating point library functions pales in comparison to
40     C.  This problem is made worse since, as noted above, it is impossible to
41     convert losslessly from 'Double' to 'CDouble' in order to use the FFI.
42     .
43     * There is no mechanism for handling rounding modes or exceptions.
44     .
45     This package is intended to address all of the above issues, and more.  All
46     are currently addressed except for rounding modes and exceptions.
47     .
48     Also provided, for convenience, is an alternative to the standard Prelude
49     which includes features from this library and the non-overlapping parts of
50     the standard Prelude.
52 Library
53     Build-Depends: base >= 4 && < 5, ghc-prim, integer
54     C-Sources: cfloat.c
55     Exposed-Modules:
56         Data.Floating.CMath,
57         Data.Floating.Classes,
58         Data.Floating.Types,
59         Data.Floating.Double,
60         Data.Floating.Prelude,
61         Data.Floating,
62         Data.Poset
63     Other-Modules:
64         Data.Floating.Instances, Data.Poset.Internal, Data.Poset.Instances