[Pkg-haskell-commits] darcs: haskell-numeric-extras: Initial check-in

Joachim Breitner mail at joachim-breitner.de
Sun Nov 24 14:50:03 UTC 2013


Sun Nov 24 14:49:38 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Initial check-in

    A ./.travis.yml
    A ./CHANGELOG.markdown
    A ./LICENSE
    A ./Numeric/
    A ./Numeric/Extras.hs
    A ./Setup.lhs
    A ./debian/
    A ./debian/changelog
    A ./debian/compat
    A ./debian/control
    A ./debian/copyright
    A ./debian/rules
    A ./debian/source/
    A ./debian/source/format
    A ./debian/watch
    A ./numeric-extras.cabal

Sun Nov 24 14:49:38 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Initial check-in
diff -rN -u old-haskell-numeric-extras/CHANGELOG.markdown new-haskell-numeric-extras/CHANGELOG.markdown
--- old-haskell-numeric-extras/CHANGELOG.markdown	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/CHANGELOG.markdown	2013-11-24 14:50:03.210355684 +0000
@@ -0,0 +1,3 @@
+0.0.3
+-----
+* Marked `Numeric.Extras` `Trustworthy`.
diff -rN -u old-haskell-numeric-extras/debian/changelog new-haskell-numeric-extras/debian/changelog
--- old-haskell-numeric-extras/debian/changelog	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/debian/changelog	2013-11-24 14:50:03.214355684 +0000
@@ -0,0 +1,5 @@
+haskell-numeric-extras (0.0.3-1) UNRELEASED; urgency=low
+
+  * Initial release.
+
+ -- Joachim Breitner <nomeata at debian.org>  Thu, 01 Jan 1970 00:00:00 +0000
diff -rN -u old-haskell-numeric-extras/debian/compat new-haskell-numeric-extras/debian/compat
--- old-haskell-numeric-extras/debian/compat	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/debian/compat	2013-11-24 14:50:03.214355684 +0000
@@ -0,0 +1 @@
+9
diff -rN -u old-haskell-numeric-extras/debian/control new-haskell-numeric-extras/debian/control
--- old-haskell-numeric-extras/debian/control	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/debian/control	2013-11-24 14:50:03.214355684 +0000
@@ -0,0 +1,53 @@
+Source: haskell-numeric-extras
+Section: haskell
+Priority: extra
+Maintainer: Debian Haskell Group <pkg-haskell-maintainers at lists.alioth.debian.org>
+Uploaders: Joachim Breitner <nomeata at debian.org>
+Build-Depends: debhelper (>= 9)
+  , cdbs
+  , haskell-devscripts (>= 0.8.15)
+  , ghc
+  , ghc-prof
+Build-Depends-Indep: ghc-doc
+Standards-Version: 3.9.2
+Homepage: http://hackage.haskell.org/package/numeric-extras
+Vcs-Darcs: http://darcs.debian.org/pkg-haskell/haskell-numeric-extras
+Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/haskell-numeric-extras
+X-Description: Short description of numeric-extras
+ Long description of numeric-extras
+
+Package: libghc-numeric-extras-dev
+Architecture: any
+Depends: ${haskell:Depends}
+  , ${shlibs:Depends}
+  , ${misc:Depends}
+Recommends: ${haskell:Recommends}
+Suggests: ${haskell:Suggests}
+Provides: ${haskell:Provides}
+Description: ${haskell:ShortDescription}${haskell:ShortBlurb}
+ ${haskell:LongDescription}
+ .
+ ${haskell:Blurb}
+
+Package: libghc-numeric-extras-prof
+Architecture: any
+Depends: ${haskell:Depends}
+  , ${misc:Depends}
+Recommends: ${haskell:Recommends}
+Suggests: ${haskell:Suggests}
+Provides: ${haskell:Provides}
+Description: ${haskell:ShortDescription}${haskell:ShortBlurb}
+ ${haskell:LongDescription}
+ .
+ ${haskell:Blurb}
+
+Package: libghc-numeric-extras-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}, ${haskell:Depends}
+Recommends: ${haskell:Recommends}
+Suggests: ${haskell:Suggests}
+Description: ${haskell:ShortDescription}${haskell:ShortBlurb}
+ ${haskell:LongDescription}
+ .
+ ${haskell:Blurb}
diff -rN -u old-haskell-numeric-extras/debian/copyright new-haskell-numeric-extras/debian/copyright
--- old-haskell-numeric-extras/debian/copyright	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/debian/copyright	2013-11-24 14:50:03.214355684 +0000
@@ -0,0 +1,43 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: numeric-extras
+Upstream-Contact: Edward Kmett <ekmett at gmail.com>
+Source: http://hackage.haskell.org/package/numeric-extras
+
+Files: *
+Copyright: 2010, Edward Kmett
+License: numeric-extras license
+
+Files: debian/*
+Copyright: 2013 Joachim Breitner
+License: numeric-extras license
+
+License: numeric-extras license
+ All rights reserved.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ .
+     * Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+ .
+     * Redistributions in binary form must reproduce the above
+       copyright notice, this list of conditions and the following
+       disclaimer in the documentation and/or other materials provided
+       with the distribution.
+ .
+     * Neither the name of Edward Kmett nor the names of other
+       contributors may be used to endorse or promote products derived
+       from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -rN -u old-haskell-numeric-extras/debian/rules new-haskell-numeric-extras/debian/rules
--- old-haskell-numeric-extras/debian/rules	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/debian/rules	2013-11-24 14:50:03.214355684 +0000
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+# DEB_ENABLE_TESTS = yes
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/hlibrary.mk
diff -rN -u old-haskell-numeric-extras/debian/source/format new-haskell-numeric-extras/debian/source/format
--- old-haskell-numeric-extras/debian/source/format	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/debian/source/format	2013-11-24 14:50:03.214355684 +0000
@@ -0,0 +1 @@
+3.0 (quilt)
diff -rN -u old-haskell-numeric-extras/debian/watch new-haskell-numeric-extras/debian/watch
--- old-haskell-numeric-extras/debian/watch	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/debian/watch	2013-11-24 14:50:03.214355684 +0000
@@ -0,0 +1,2 @@
+version=3
+http://hackage.haskell.org/package/numeric-extras/distro-monitor .*-([0-9\.]+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
diff -rN -u old-haskell-numeric-extras/LICENSE new-haskell-numeric-extras/LICENSE
--- old-haskell-numeric-extras/LICENSE	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/LICENSE	2013-11-24 14:50:03.210355684 +0000
@@ -0,0 +1,31 @@
+Copyright (c) 2010, Edward Kmett
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of Edward Kmett nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -rN -u old-haskell-numeric-extras/Numeric/Extras.hs new-haskell-numeric-extras/Numeric/Extras.hs
--- old-haskell-numeric-extras/Numeric/Extras.hs	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/Numeric/Extras.hs	2013-11-24 14:50:03.210355684 +0000
@@ -0,0 +1,82 @@
+{-# LANGUAGE ForeignFunctionInterface, FlexibleContexts, TypeFamilies #-}
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
+module Numeric.Extras
+    ( RealExtras(..)
+    ) where
+
+import Foreign
+import Foreign.C.Types
+
+class (Storable (C a), RealFloat (C a), RealFloat a) => RealExtras a where
+    type C a :: *
+    fmod :: a -> a -> a
+    expm1 :: a -> a
+    log1p :: a -> a
+    hypot :: a -> a -> a
+    cbrt  :: a -> a
+    erf   :: a -> a
+
+instance RealExtras Double where
+    type C Double = CDouble
+    fmod = lift2D c_fmod
+    expm1 = lift1D c_expm1
+    log1p = lift1D c_log1p
+    hypot = lift2D c_hypot
+    cbrt = lift1D c_cbrt
+    erf = lift1D c_erf
+
+lift1D :: (CDouble -> CDouble) -> Double -> Double
+lift1D f a = realToFrac (f (realToFrac a))
+{-# INLINE lift1D #-}
+
+lift2D :: (CDouble -> CDouble -> CDouble) -> Double -> Double -> Double
+lift2D f a b = realToFrac (f (realToFrac a) (realToFrac b))
+{-# INLINE lift2D #-}
+
+instance RealExtras Float where
+    type C Float = CFloat
+    fmod = lift2F c_fmodf
+    expm1 = lift1F c_expm1f
+    log1p = lift1F c_log1pf
+    hypot = lift2F c_hypotf
+    cbrt  = lift1F c_cbrtf
+    erf   = lift1F c_erff
+
+lift1F :: (CFloat -> CFloat) -> Float -> Float
+lift1F f a = realToFrac (f (realToFrac a))
+{-# INLINE lift1F #-}
+
+lift2F :: (CFloat -> CFloat -> CFloat) -> Float -> Float -> Float
+lift2F f a b = realToFrac (f (realToFrac a) (realToFrac b))
+{-# INLINE lift2F #-}
+
+foreign import ccall unsafe "math.h fmod" 
+    c_fmod :: CDouble -> CDouble -> CDouble
+foreign import ccall unsafe "math.h expm1" 
+    c_expm1 :: CDouble -> CDouble
+foreign import ccall unsafe "math.h log1p" 
+    c_log1p :: CDouble -> CDouble
+foreign import ccall unsafe "math.h hypot" 
+    c_hypot :: CDouble -> CDouble -> CDouble
+foreign import ccall unsafe "math.h cbrt" 
+    c_cbrt :: CDouble -> CDouble
+foreign import ccall unsafe "math.h erf"
+    c_erf :: CDouble -> CDouble
+
+foreign import ccall unsafe "math.h fmodf" 
+    c_fmodf :: CFloat -> CFloat -> CFloat
+foreign import ccall unsafe "math.h expm1f" 
+    c_expm1f :: CFloat -> CFloat
+foreign import ccall unsafe "math.h log1pf" 
+    c_log1pf :: CFloat -> CFloat
+foreign import ccall unsafe "math.h hypotf" 
+    c_hypotf :: CFloat -> CFloat -> CFloat
+foreign import ccall unsafe "math.h cbrtf" 
+    c_cbrtf :: CFloat -> CFloat
+foreign import ccall unsafe "math.h erff"
+    c_erff :: CFloat -> CFloat
+
+default (Double)
diff -rN -u old-haskell-numeric-extras/numeric-extras.cabal new-haskell-numeric-extras/numeric-extras.cabal
--- old-haskell-numeric-extras/numeric-extras.cabal	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/numeric-extras.cabal	2013-11-24 14:50:03.214355684 +0000
@@ -0,0 +1,32 @@
+name:              numeric-extras
+version:           0.0.3
+synopsis:          Useful tools from the C standard library
+homepage:          http://github.com/ekmett/numeric-extras
+bug-reports:       http://github.com/ekmett/numeric-extras/issues
+license:           BSD3
+license-file:      LICENSE
+author:            Edward Kmett
+maintainer:        ekmett at gmail.com
+category:          Math
+build-type:        Simple
+cabal-version:     >=1.6
+
+extra-source-files: .travis.yml CHANGELOG.markdown
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/numeric-extras.git
+
+library
+  other-extensions:
+    ForeignFunctionInterface
+    FlexibleContexts
+    TypeFamilies
+
+  exposed-modules:
+    Numeric.Extras
+
+  build-depends:
+    base >= 4 && < 5
+
+  ghc-options: -Wall -O2
diff -rN -u old-haskell-numeric-extras/Setup.lhs new-haskell-numeric-extras/Setup.lhs
--- old-haskell-numeric-extras/Setup.lhs	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/Setup.lhs	2013-11-24 14:50:03.210355684 +0000
@@ -0,0 +1,3 @@
+#!/usr/bin/env runhaskell
+> import Distribution.Simple
+> main = defaultMainWithHooks simpleUserHooks
diff -rN -u old-haskell-numeric-extras/.travis.yml new-haskell-numeric-extras/.travis.yml
--- old-haskell-numeric-extras/.travis.yml	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-numeric-extras/.travis.yml	2013-11-24 14:50:03.210355684 +0000
@@ -0,0 +1 @@
+language: haskell




More information about the Pkg-haskell-commits mailing list