fast-arithmetic 0.3.2.1 → 0.3.2.4
raw patch · 9 files changed
+7/−41 lines, 9 files
Files
- cbits/combinatorics.c +1/−1
- cbits/number-theory.c +1/−1
- cbits/numerics.c +1/−1
- fast-arithmetic.cabal +4/−5
- src/Data/GMP.hs +0/−5
- src/Numeric/Common.hs +0/−10
- src/Numeric/Integer.hs +0/−6
- src/Numeric/NumberTheory.hs +0/−6
- src/Numeric/Pure.hs +0/−6
cbits/combinatorics.c view
@@ -1,7 +1,7 @@ /* ** ** The C code is generated by [ATS/Postiats-0-3-8]-** The starting compilation time is: 2018-1-27: 21h:42m+** The starting compilation time is: 2018-1-28: 7h:35m ** */
cbits/number-theory.c view
@@ -1,7 +1,7 @@ /* ** ** The C code is generated by [ATS/Postiats-0-3-8]-** The starting compilation time is: 2018-1-27: 21h:42m+** The starting compilation time is: 2018-1-28: 7h:35m ** */
cbits/numerics.c view
@@ -1,7 +1,7 @@ /* ** ** The C code is generated by [ATS/Postiats-0-3-8]-** The starting compilation time is: 2018-1-27: 21h:42m+** The starting compilation time is: 2018-1-28: 7h:35m ** */
fast-arithmetic.cabal view
@@ -1,5 +1,5 @@ name: fast-arithmetic-version: 0.3.2.1+version: 0.3.2.4 synopsis: Fast functions on integers. description: Fast functions for number theory and combinatorics with a high level of safety guaranteed by [ATS](http://www.ats-lang.org/). This package also provides a 'Storable' instance for GMP's @mpz@ type.@@ -28,7 +28,7 @@ custom-setup -- ghc-options: -threaded -rtsopts -with-rtsopts=-N setup-depends: base- , ats-setup+ , ats-setup >= 0.1.0.2 , Cabal library@@ -46,13 +46,12 @@ , Numeric.Combinatorics , Data.GMP other-modules: Numeric.Common- build-depends: base >= 4.8 && < 5+ build-depends: base >= 4.10 && < 5 , composition-prelude , recursion-schemes default-language: Haskell2010 if flag(development)- if impl(ghc >= 8.0)- ghc-options: -Werror+ ghc-options: -Werror if impl(ghc >= 8.0) ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates -Wcompat ghc-options: -Wall -optc-mtune=native -optc-flto -optc-O3
src/Data/GMP.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- {-| Module : Data.GMP Copyright : Copyright (c) 2017 Vanessa McHale@@ -14,9 +12,6 @@ , conjugateGMP ) where -#if __GLASGOW_HASKELL__ <= 784-import Control.Applicative-#endif import Control.Monad ((<=<)) import Data.Functor.Foldable import Data.Word
src/Numeric/Common.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- module Numeric.Common ( conjugate , asTest ) where@@ -7,21 +5,13 @@ import Data.Word import Foreign.C -#if __GLASGOW_HASKELL__ >= 820 asTest :: Integral a => (CInt -> CBool) -> a -> Bool-#else-asTest :: Integral a => (CInt -> CUChar) -> a -> Bool-#endif asTest f = convertBool . f . fromIntegral conjugate :: (Integral a, Integral b) => (CInt -> CInt) -> a -> b conjugate f = fromIntegral . f . fromIntegral -#if __GLASGOW_HASKELL__ >= 820 convertBool :: CBool -> Bool-#else-convertBool :: CUChar -> Bool-#endif convertBool = go . fromIntegral where go :: Word8 -> Bool
src/Numeric/Integer.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- {-| Module : Numeric.Combinatorics Copyright : Copyright (c) 2017 Vanessa McHale@@ -16,11 +14,7 @@ import Foreign.Ptr import Numeric.Common -#if __GLASGOW_HASKELL__ >= 820 foreign import ccall unsafe is_prime_ats :: CInt -> CBool-#else-foreign import ccall unsafe is_prime_ats :: CInt -> CUChar-#endif foreign import ccall unsafe fib_ats :: CInt -> Ptr GMPInt -- | Indexed starting at @0@.
src/Numeric/NumberTheory.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- {-| Module : Numeric.NumberTheory Copyright : Copyright (c) 2017 Vanessa McHale@@ -21,11 +19,7 @@ foreign import ccall unsafe count_divisors_ats :: CInt -> CInt foreign import ccall unsafe sum_divisors_ats :: CInt -> CInt foreign import ccall unsafe little_omega_ats :: CInt -> CInt-#if __GLASGOW_HASKELL__ >= 820 foreign import ccall unsafe is_perfect_ats :: CInt -> CBool-#else-foreign import ccall unsafe is_perfect_ats :: CInt -> CUChar-#endif -- | See [here](http://mathworld.wolfram.com/PerfectNumber.html) isPerfect :: Int -> Bool
src/Numeric/Pure.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- -- | Pure Haskell functions. These tend to be more general than the equivalents -- in ATS. module Numeric.Pure ( -- * Useful functions@@ -8,10 +6,6 @@ , hsIsPrime , hsFibonacci ) where--#if __GLASGOW_HASKELL__ <= 784-import Control.Applicative-#endif {-# SPECIALIZE hsIsPrime :: Int -> Bool #-}