packages feed

factory-0.2.0.0: factory.cabal

--Package-properties
Name:			factory
Version:		0.2.0.0
Cabal-Version:		>= 1.6
Copyright:		(C) 2011 Dr. Alistair Ward
License:		GPL
License-file:		LICENSE
Author:			Dr. Alistair Ward
Stability:		Unstable interface, incomplete features.
Synopsis:		Rational arithmetic in an irrational world.
Build-Type:		Simple
Description:		A library of number-theory functions, for; factorials, square-roots, Pi and primes.
Category:		Math, Number Theory
Tested-With:		GHC == 6.10, GHC == 6.12, GHC == 7.0
Homepage:		http://functionalley.eu
Maintainer:		factory <at> functionalley <dot> eu
Bug-reports:		factory <at> functionalley <dot> eu
Extra-Source-Files:	changelog, copyright, makefile

flag llvm
    Description:	Whether the 'llvm' compiler-backend has been installed and is required for code-generation.
    manual:		True
    default:		False

flag threaded
    Description:	Enable parallelized code.
    default:		True

Library
    hs-source-dirs:	src

    Exposed-modules:
        Factory.Data.Exponential
        Factory.Data.Interval
        Factory.Data.MonicPolynomial
        Factory.Data.Monomial
        Factory.Data.Polynomial
        Factory.Data.PrimeFactors
        Factory.Data.PrimeWheel
        Factory.Data.QuotientRing
        Factory.Data.Ring
        Factory.Math.ArithmeticGeometricMean
        Factory.Math.DivideAndConquer
        Factory.Math.Factorial
        Factory.Math.Fibonacci
        Factory.Math.Hyperoperation
        Factory.Math.Implementations.Factorial
        Factory.Math.Implementations.Pi.AGM.Algorithm
        Factory.Math.Implementations.Pi.AGM.BrentSalamin
        Factory.Math.Implementations.Pi.BBP.Algorithm
        Factory.Math.Implementations.Pi.BBP.Base65536
        Factory.Math.Implementations.Pi.BBP.Bellard
        Factory.Math.Implementations.Pi.BBP.Implementation
        Factory.Math.Implementations.Pi.BBP.Series
        Factory.Math.Implementations.Pi.Borwein.Algorithm
        Factory.Math.Implementations.Pi.Borwein.Borwein1993
        Factory.Math.Implementations.Pi.Borwein.Implementation
        Factory.Math.Implementations.Pi.Borwein.Series
        Factory.Math.Implementations.Pi.Ramanujan.Algorithm
        Factory.Math.Implementations.Pi.Ramanujan.Chudnovsky
        Factory.Math.Implementations.Pi.Ramanujan.Classic
        Factory.Math.Implementations.Pi.Ramanujan.Implementation
        Factory.Math.Implementations.Pi.Ramanujan.Series
        Factory.Math.Implementations.Pi.Spigot.Algorithm
        Factory.Math.Implementations.Pi.Spigot.Gosper
        Factory.Math.Implementations.Pi.Spigot.RabinowitzWagon
        Factory.Math.Implementations.Pi.Spigot.Series
        Factory.Math.Implementations.Pi.Spigot.Spigot
        Factory.Math.Implementations.Primality
        Factory.Math.Implementations.PrimeFactorisation
        Factory.Math.Implementations.Primes.Algorithm
        Factory.Math.Implementations.Primes.SieveOfAtkin
        Factory.Math.Implementations.Primes.SieveOfEratosthenes
        Factory.Math.Implementations.Primes.TrialDivision
        Factory.Math.Implementations.Primes.TurnersSieve
        Factory.Math.Implementations.SquareRoot
        Factory.Math.MultiplicativeOrder
        Factory.Math.PerfectPower
        Factory.Math.Pi
        Factory.Math.Power
        Factory.Math.Precision
        Factory.Math.Primality
        Factory.Math.PrimeFactorisation
        Factory.Math.Primes
        Factory.Math.Probability
        Factory.Math.Radix
        Factory.Math.SquareRoot
        Factory.Math.Statistics
        Factory.Math.Summation

    Build-depends:
        array,
        base == 4.*,
        deepseq >= 1.1,
        containers,
        primes >= 0.1,
        random,
        toolshed >= 0.12

    if flag(threaded)
        Build-depends:	parallel >= 3.0
    else
        Build-depends:	parallel

    GHC-options:	-Wall -O2
    GHC-prof-options:	-prof -auto-all -caf-all

    if impl(ghc >= 7.0) && flag(llvm)
        GHC-options:	-fllvm

Executable factory
    hs-source-dirs:	src

    Main-Is:		Main.hs

    Other-modules:
        Factory.Test.CommandOptions
        Factory.Test.Performance.Factorial
        Factory.Test.Performance.Hyperoperation
        Factory.Test.Performance.Pi
        Factory.Test.Performance.Primality
        Factory.Test.Performance.PrimeFactorisation
        Factory.Test.Performance.Primes
        Factory.Test.Performance.SquareRoot
        Factory.Test.Performance.Statistics
        Factory.Test.QuickCheck.ArithmeticGeometricMean
        Factory.Test.QuickCheck.Factorial
        Factory.Test.QuickCheck.Hyperoperation
        Factory.Test.QuickCheck.Interval
        Factory.Test.QuickCheck.MonicPolynomial
        Factory.Test.QuickCheck.PerfectPower
        Factory.Test.QuickCheck.Pi
        Factory.Test.QuickCheck.Polynomial
        Factory.Test.QuickCheck.Power
        Factory.Test.QuickCheck.Primality
        Factory.Test.QuickCheck.PrimeFactorisation
        Factory.Test.QuickCheck.Primes
        Factory.Test.QuickCheck.Probability
        Factory.Test.QuickCheck.QuickChecks
        Factory.Test.QuickCheck.Radix
        Factory.Test.QuickCheck.SquareRoot
        Factory.Test.QuickCheck.Statistics
        Factory.Test.QuickCheck.Summation

    Build-depends:
        Cabal >= 1.6 && < 2,
        haskell98,
        QuickCheck >= 2.2

    GHC-options:	-Wall -O2
    GHC-prof-options:	-prof -auto-all -caf-all

    if flag(threaded)
        GHC-options:	-threaded

        if impl(ghc >= 6.12)
            GHC-options:	-feager-blackholing

    if impl(ghc >= 7.0)
        GHC-options:	-rtsopts

        if flag(llvm)
            GHC-options:	-fllvm