File: mwc-random.cabal

package info (click to toggle)
haskell-mwc-random 0.15.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 388 kB
  • sloc: haskell: 1,333; makefile: 2
file content (149 lines) | stat: -rw-r--r-- 4,478 bytes parent folder | download
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
cabal-version:  3.0
build-type:     Simple
name:           mwc-random
version:        0.15.1.0
license:        BSD-2-Clause
license-file:   LICENSE
copyright:      2009, 2010, 2011 Bryan O'Sullivan

author:         Bryan O'Sullivan <bos@serpentine.com>
maintainer:     Alexey Khudyakov <alexey.skladnoy@gmail.com>
homepage:       https://github.com/haskell/mwc-random
bug-reports:    https://github.com/haskell/mwc-random/issues

category:       Math, Statistics
synopsis:       Fast, high quality pseudo random number generation
description:
  This package contains code for generating high quality random
  numbers that follow either a uniform or normal distribution.  The
  generated numbers are suitable for use in statistical applications.
  .
  The uniform PRNG uses Marsaglia's MWC256 (also known as MWC8222)
  multiply-with-carry generator, which has a period of 2^8222 and
  fares well in tests of randomness.  It is also extremely fast,
  between 2 and 3 times faster than the Mersenne Twister.
  .
  Compared to the mersenne-random package, this package has a more
  convenient API, is faster, and supports more statistical
  distributions.


extra-source-files:
  README.md

extra-doc-files:
  docs/*.svg
  changelog.md

tested-with:
  GHC ==8.0.2
   || ==8.2.2
   || ==8.4.4
   || ==8.6.5
   || ==8.8.4
   || ==8.10.7
   || ==9.0.2
   || ==9.2.8
   || ==9.4.8
   || ==9.6.5
   || ==9.6.5
   || ==9.8.2


source-repository head
  type:     git
  location: git://github.com/haskell/mwc-random

flag BenchPAPI
  Description: Enable building of benchmarks which use instruction counters.
               It requires libpapi and only works on Linux so it's protected by flag
  Default: False
  Manual:  True

library
  default-language: Haskell2010
  exposed-modules: System.Random.MWC
                   System.Random.MWC.Distributions
                   System.Random.MWC.CondensedTable
                   System.Random.MWC.SeedSource
  build-depends: base           >= 4.9 && < 5
               , primitive      >= 0.6.2
               , random         >= 1.2
               , time
               , vector         >= 0.7
               , math-functions >= 0.2.1.0

  ghc-options: -Wall -funbox-strict-fields -fwarn-tabs


-- We want to be able to build benchmarks using both tasty-bench and tasty-papi.
-- They have similar API so we just create two shim modules which reexport
-- definitions from corresponding library and pick one in cabal file.
common bench-stanza
  ghc-options:      -Wall
  default-language: Haskell2010
  build-depends: base < 5
               , vector          >= 0.11
               , mersenne-random
               , mwc-random
               , random
               , tasty           >=1.3.1

benchmark mwc-bench
  import:         bench-stanza
  type:           exitcode-stdio-1.0
  hs-source-dirs: bench bench-time
  main-is:        Benchmark.hs
  Other-modules:  Bench
  build-depends:  tasty-bench >= 0.3

benchmark mwc-bench-papi
  import:         bench-stanza
  type:           exitcode-stdio-1.0
  if impl(ghcjs) || !flag(BenchPAPI) || impl(ghc < 8.2)
     buildable: False
  hs-source-dirs: bench bench-papi
  main-is:        Benchmark.hs
  Other-modules:  Bench
  build-depends:  tasty-papi >= 0.1.2

test-suite mwc-prop-tests
  type:           exitcode-stdio-1.0
  hs-source-dirs: tests
  main-is:        props.hs
  default-language: Haskell2010
  ghc-options:
    -Wall -threaded -rtsopts

  build-depends: base
               , mwc-random
               , QuickCheck                 >=2.2
               , vector                     >=0.12.1
               , tasty                      >=1.3.1
               , tasty-quickcheck
               , tasty-hunit
               , random     >=1.2
               , mtl
               , math-functions             >=0.3.4

test-suite mwc-doctests
  type:             exitcode-stdio-1.0
  main-is:          doctests.hs
  hs-source-dirs:   tests
  default-language: Haskell2010
  if impl(ghcjs) || impl(ghc < 8.0)
    Buildable: False
  -- Linker on macos prints warnings to console which confuses doctests.
  -- We simply disable doctests on ma for older GHC
  -- > warning: -single_module is obsolete
  if os(darwin) && impl(ghc < 9.6)
    buildable: False
  build-depends:
            base       -any
          , mwc-random -any
          , doctest    >=0.15 && <0.23
            --
          , bytestring
          , primitive
          , vector     >=0.11
          , random     >=1.2