Library for working with continued fractions in Haskell

root / continued-fraction.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
cabal-version: 1.18
name: continued-fraction
version: 0.1.0.7
license: BSD3
license-file: LICENSE
copyright: Copyright: (c) 2018 Vanessa McHale
maintainer: vamchale@gmail.com
author: Vanessa McHale
homepage: https://hub.darcs.net/vmchale/continued-fraction#readme
synopsis: Types and functions for working with continued fractions in Haskell
description:
    This package provides facilities for working with both continued fractions
    and rational approximants. It uses lists internally, so it may not be suitable
    if you need large convergents.
category: Math
build-type: Simple
extra-source-files:
    stack.yaml
    cabal.project.local
extra-doc-files: README.md

source-repository head
    type: darcs
    location: https://hub.darcs.net/vmchale/continued-fraction

flag development
    description:
        Enable `-Werror`
    default: False
    manual: True

library
    exposed-modules:
        Num.ContinuedFraction
    hs-source-dirs: src
    default-language: Haskell2010
    ghc-options: -Wall
    build-depends:
        base >=4.9 && <5,
        recursion-schemes >=5.0
    
    if flag(development)
        ghc-options: -Werror
    
    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates

test-suite continued-fractions-test
    type: exitcode-stdio-1.0
    main-is: Spec.hs
    hs-source-dirs: test
    default-language: Haskell2010
    ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
    build-depends:
        base -any,
        continued-fraction -any,
        hspec -any
    
    if flag(development)
        ghc-options: -Werror
    
    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates

benchmark continued-fractions-bench
    type: exitcode-stdio-1.0
    main-is: Bench.hs
    hs-source-dirs: bench
    default-language: Haskell2010
    ghc-options: -Wall
    build-depends:
        base -any,
        continued-fraction -any,
        criterion -any
    
    if flag(development)
        ghc-options: -Werror
    
    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates