From 3831bed8a046e53483292a0771ee1ff5b3fecf7a Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Sat, 24 Dec 2011 21:21:29 +0100 Subject: Warning police --- lib/Numeric/GSL/Differentiation.hs | 2 +- lib/Numeric/GSL/Fitting.hs | 2 +- lib/Numeric/GSL/Fourier.hs | 2 +- lib/Numeric/GSL/Integration.hs | 2 +- lib/Numeric/GSL/Internal.hs | 2 +- lib/Numeric/GSL/Minimization.hs | 2 +- lib/Numeric/GSL/ODE.hs | 2 +- lib/Numeric/GSL/Polynomials.hs | 1 + lib/Numeric/GSL/Root.hs | 4 ++-- lib/Numeric/GSL/Vector.hs | 2 +- 10 files changed, 11 insertions(+), 10 deletions(-) (limited to 'lib/Numeric/GSL') diff --git a/lib/Numeric/GSL/Differentiation.hs b/lib/Numeric/GSL/Differentiation.hs index a3c1aea..1df58a1 100644 --- a/lib/Numeric/GSL/Differentiation.hs +++ b/lib/Numeric/GSL/Differentiation.hs @@ -22,7 +22,7 @@ module Numeric.GSL.Differentiation ( derivBackward ) where -import Foreign.C.Types(CInt) +import Foreign.C.Types(CInt(..)) import Foreign.Marshal.Alloc(malloc, free) import Foreign.Ptr(Ptr, FunPtr, freeHaskellFunPtr) import Foreign.Storable(peek) diff --git a/lib/Numeric/GSL/Fitting.hs b/lib/Numeric/GSL/Fitting.hs index 337dc6a..da5c0fc 100644 --- a/lib/Numeric/GSL/Fitting.hs +++ b/lib/Numeric/GSL/Fitting.hs @@ -54,7 +54,7 @@ import Numeric.LinearAlgebra import Numeric.GSL.Internal import Foreign.Ptr(FunPtr, freeHaskellFunPtr) -import Foreign.C.Types(CInt) +import Foreign.C.Types(CInt(..)) import System.IO.Unsafe(unsafePerformIO) ------------------------------------------------------------------------- diff --git a/lib/Numeric/GSL/Fourier.hs b/lib/Numeric/GSL/Fourier.hs index 25487d4..5cc50dc 100644 --- a/lib/Numeric/GSL/Fourier.hs +++ b/lib/Numeric/GSL/Fourier.hs @@ -22,7 +22,7 @@ module Numeric.GSL.Fourier ( import Data.Packed.Internal import Data.Complex -import Foreign.C.Types(CInt) +import Foreign.C.Types(CInt(..)) import System.IO.Unsafe (unsafePerformIO) genfft code v = unsafePerformIO $ do diff --git a/lib/Numeric/GSL/Integration.hs b/lib/Numeric/GSL/Integration.hs index 84e8546..a59862a 100644 --- a/lib/Numeric/GSL/Integration.hs +++ b/lib/Numeric/GSL/Integration.hs @@ -20,7 +20,7 @@ module Numeric.GSL.Integration ( integrateQAGS ) where -import Foreign.C.Types(CInt) +import Foreign.C.Types(CInt(..)) import Foreign.Marshal.Alloc(malloc, free) import Foreign.Ptr(Ptr, FunPtr, freeHaskellFunPtr) import Foreign.Storable(peek) diff --git a/lib/Numeric/GSL/Internal.hs b/lib/Numeric/GSL/Internal.hs index db2c633..a6c81ee 100644 --- a/lib/Numeric/GSL/Internal.hs +++ b/lib/Numeric/GSL/Internal.hs @@ -16,7 +16,7 @@ import Data.Packed.Internal import Foreign.Marshal.Array(copyArray) import Foreign.Ptr(Ptr, FunPtr) -import Foreign.C.Types(CInt) +import Foreign.C.Types(CInt(..)) import System.IO.Unsafe(unsafePerformIO) iv :: (Vector Double -> Double) -> (CInt -> Ptr Double -> Double) diff --git a/lib/Numeric/GSL/Minimization.hs b/lib/Numeric/GSL/Minimization.hs index 5770c91..6fac640 100644 --- a/lib/Numeric/GSL/Minimization.hs +++ b/lib/Numeric/GSL/Minimization.hs @@ -65,7 +65,7 @@ import Data.Packed.Matrix import Numeric.GSL.Internal import Foreign.Ptr(Ptr, FunPtr, freeHaskellFunPtr) -import Foreign.C.Types(CInt) +import Foreign.C.Types(CInt(..)) import System.IO.Unsafe(unsafePerformIO) ------------------------------------------------------------------------ diff --git a/lib/Numeric/GSL/ODE.hs b/lib/Numeric/GSL/ODE.hs index ea064d6..86c8bab 100644 --- a/lib/Numeric/GSL/ODE.hs +++ b/lib/Numeric/GSL/ODE.hs @@ -36,7 +36,7 @@ import Data.Packed.Internal import Numeric.GSL.Internal import Foreign.Ptr(FunPtr, nullFunPtr, freeHaskellFunPtr) -import Foreign.C.Types(CInt) +import Foreign.C.Types(CInt(..)) import System.IO.Unsafe(unsafePerformIO) ------------------------------------------------------------------------- diff --git a/lib/Numeric/GSL/Polynomials.hs b/lib/Numeric/GSL/Polynomials.hs index 9885920..903c678 100644 --- a/lib/Numeric/GSL/Polynomials.hs +++ b/lib/Numeric/GSL/Polynomials.hs @@ -21,6 +21,7 @@ module Numeric.GSL.Polynomials ( import Data.Packed.Internal import Data.Complex +import Foreign.C.Types(CInt(..)) import System.IO.Unsafe (unsafePerformIO) {- | Solution of general polynomial equations, using /gsl_poly_complex_solve/. For example, diff --git a/lib/Numeric/GSL/Root.hs b/lib/Numeric/GSL/Root.hs index 784bbd4..5dfd4d7 100644 --- a/lib/Numeric/GSL/Root.hs +++ b/lib/Numeric/GSL/Root.hs @@ -53,8 +53,8 @@ import Data.Packed.Internal import Data.Packed.Matrix import Numeric.GSL.Internal -import Foreign.Ptr(FunPtr, freeHaskellFunPtr) -import Foreign.C.Types(CInt) +import Foreign.Ptr(FunPtr, freeHaskellFunPtr) +import Foreign.C.Types(CInt(..)) import System.IO.Unsafe(unsafePerformIO) ------------------------------------------------------------------------- diff --git a/lib/Numeric/GSL/Vector.hs b/lib/Numeric/GSL/Vector.hs index e912953..d0f419b 100644 --- a/lib/Numeric/GSL/Vector.hs +++ b/lib/Numeric/GSL/Vector.hs @@ -31,7 +31,7 @@ import Data.Complex import Foreign.Marshal.Alloc(free) import Foreign.Marshal.Array(newArray) import Foreign.Ptr(Ptr) -import Foreign.C.Types(CInt) +import Foreign.C.Types(CInt(..)) import System.IO.Unsafe(unsafePerformIO) fromei x = fromIntegral (fromEnum x) :: CInt -- cgit v1.2.3 From 43956aff360476d095b03fbbdef20f18df2dc933 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Sat, 24 Dec 2011 21:39:19 +0100 Subject: Warning police for GHC < 7.4 The previous patch got rid of warnings when ghc >= 7.4. Unfortunately this caused warnings on GHC < 7.4. This patch removes warnings on all versions of GHC. --- lib/Data/Packed/Internal/Common.hs | 2 +- lib/Data/Packed/Internal/Matrix.hs | 2 +- lib/Data/Packed/Internal/Vector.hs | 2 +- lib/Numeric/ContainerBoot.hs | 4 ++++ lib/Numeric/GSL/Differentiation.hs | 2 +- lib/Numeric/GSL/Fitting.hs | 2 +- lib/Numeric/GSL/Fourier.hs | 2 +- lib/Numeric/GSL/Integration.hs | 2 +- lib/Numeric/GSL/Internal.hs | 2 +- lib/Numeric/GSL/Minimization.hs | 2 +- lib/Numeric/GSL/ODE.hs | 2 +- lib/Numeric/GSL/Polynomials.hs | 7 +++++-- lib/Numeric/GSL/Root.hs | 2 +- lib/Numeric/GSL/Vector.hs | 2 +- lib/Numeric/LinearAlgebra/LAPACK.hs | 2 +- 15 files changed, 22 insertions(+), 15 deletions(-) (limited to 'lib/Numeric/GSL') diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs index 60e3444..a8c3c3e 100644 --- a/lib/Data/Packed/Internal/Common.hs +++ b/lib/Data/Packed/Internal/Common.hs @@ -27,7 +27,7 @@ module Data.Packed.Internal.Common( import Foreign import Control.Monad(when) import Foreign.C.String(peekCString) -import Foreign.C.Types(CInt(..), CChar) +import Foreign.C.Types import Foreign.Storable.Complex() import Data.List(transpose,intersperse) import Control.Exception as E diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs index 9fbaf6d..5d05e50 100644 --- a/lib/Data/Packed/Internal/Matrix.hs +++ b/lib/Data/Packed/Internal/Matrix.hs @@ -44,7 +44,7 @@ import Foreign.Marshal.Array(newArray) import Foreign.Ptr(Ptr, castPtr) import Foreign.Storable(Storable, peekElemOff, pokeElemOff, poke, sizeOf) import Data.Complex(Complex) -import Foreign.C.Types(CInt(..), CChar) +import Foreign.C.Types import Foreign.C.String(newCString) import System.IO.Unsafe(unsafePerformIO) diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs index 5062bc0..b9dba8e 100644 --- a/lib/Data/Packed/Internal/Vector.hs +++ b/lib/Data/Packed/Internal/Vector.hs @@ -38,7 +38,7 @@ import Foreign.ForeignPtr(ForeignPtr, castForeignPtr) import Foreign.Ptr(Ptr) import Foreign.Storable(Storable, peekElemOff, pokeElemOff, sizeOf) import Foreign.C.String -import Foreign.C.Types(CInt(..), CChar) +import Foreign.C.Types import Data.Complex import Control.Monad(when) import System.IO.Unsafe(unsafePerformIO) diff --git a/lib/Numeric/ContainerBoot.hs b/lib/Numeric/ContainerBoot.hs index fb783ce..0215711 100644 --- a/lib/Numeric/ContainerBoot.hs +++ b/lib/Numeric/ContainerBoot.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} @@ -49,7 +50,10 @@ import Data.Packed.ST as ST import Numeric.Conversion import Data.Packed.Internal import Numeric.GSL.Vector + +#if __GLASGOW_HASKELL__ >= 704 import Foreign.C.Types(CInt(..)) +#endif import Data.Complex import Control.Monad(ap) diff --git a/lib/Numeric/GSL/Differentiation.hs b/lib/Numeric/GSL/Differentiation.hs index 1df58a1..ab5eb50 100644 --- a/lib/Numeric/GSL/Differentiation.hs +++ b/lib/Numeric/GSL/Differentiation.hs @@ -22,7 +22,7 @@ module Numeric.GSL.Differentiation ( derivBackward ) where -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import Foreign.Marshal.Alloc(malloc, free) import Foreign.Ptr(Ptr, FunPtr, freeHaskellFunPtr) import Foreign.Storable(peek) diff --git a/lib/Numeric/GSL/Fitting.hs b/lib/Numeric/GSL/Fitting.hs index da5c0fc..79db23f 100644 --- a/lib/Numeric/GSL/Fitting.hs +++ b/lib/Numeric/GSL/Fitting.hs @@ -54,7 +54,7 @@ import Numeric.LinearAlgebra import Numeric.GSL.Internal import Foreign.Ptr(FunPtr, freeHaskellFunPtr) -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import System.IO.Unsafe(unsafePerformIO) ------------------------------------------------------------------------- diff --git a/lib/Numeric/GSL/Fourier.hs b/lib/Numeric/GSL/Fourier.hs index 5cc50dc..71bc8a1 100644 --- a/lib/Numeric/GSL/Fourier.hs +++ b/lib/Numeric/GSL/Fourier.hs @@ -22,7 +22,7 @@ module Numeric.GSL.Fourier ( import Data.Packed.Internal import Data.Complex -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import System.IO.Unsafe (unsafePerformIO) genfft code v = unsafePerformIO $ do diff --git a/lib/Numeric/GSL/Integration.hs b/lib/Numeric/GSL/Integration.hs index a59862a..a0e922b 100644 --- a/lib/Numeric/GSL/Integration.hs +++ b/lib/Numeric/GSL/Integration.hs @@ -20,7 +20,7 @@ module Numeric.GSL.Integration ( integrateQAGS ) where -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import Foreign.Marshal.Alloc(malloc, free) import Foreign.Ptr(Ptr, FunPtr, freeHaskellFunPtr) import Foreign.Storable(peek) diff --git a/lib/Numeric/GSL/Internal.hs b/lib/Numeric/GSL/Internal.hs index a6c81ee..303e7e1 100644 --- a/lib/Numeric/GSL/Internal.hs +++ b/lib/Numeric/GSL/Internal.hs @@ -16,7 +16,7 @@ import Data.Packed.Internal import Foreign.Marshal.Array(copyArray) import Foreign.Ptr(Ptr, FunPtr) -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import System.IO.Unsafe(unsafePerformIO) iv :: (Vector Double -> Double) -> (CInt -> Ptr Double -> Double) diff --git a/lib/Numeric/GSL/Minimization.hs b/lib/Numeric/GSL/Minimization.hs index 6fac640..88acfac 100644 --- a/lib/Numeric/GSL/Minimization.hs +++ b/lib/Numeric/GSL/Minimization.hs @@ -65,7 +65,7 @@ import Data.Packed.Matrix import Numeric.GSL.Internal import Foreign.Ptr(Ptr, FunPtr, freeHaskellFunPtr) -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import System.IO.Unsafe(unsafePerformIO) ------------------------------------------------------------------------ diff --git a/lib/Numeric/GSL/ODE.hs b/lib/Numeric/GSL/ODE.hs index 86c8bab..2251acd 100644 --- a/lib/Numeric/GSL/ODE.hs +++ b/lib/Numeric/GSL/ODE.hs @@ -36,7 +36,7 @@ import Data.Packed.Internal import Numeric.GSL.Internal import Foreign.Ptr(FunPtr, nullFunPtr, freeHaskellFunPtr) -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import System.IO.Unsafe(unsafePerformIO) ------------------------------------------------------------------------- diff --git a/lib/Numeric/GSL/Polynomials.hs b/lib/Numeric/GSL/Polynomials.hs index 903c678..b21b1b6 100644 --- a/lib/Numeric/GSL/Polynomials.hs +++ b/lib/Numeric/GSL/Polynomials.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE CPP, ForeignFunctionInterface #-} ----------------------------------------------------------------------------- {- | Module : Numeric.GSL.Polynomials @@ -21,9 +21,12 @@ module Numeric.GSL.Polynomials ( import Data.Packed.Internal import Data.Complex -import Foreign.C.Types(CInt(..)) import System.IO.Unsafe (unsafePerformIO) +#if __GLASGOW_HASKELL__ >= 704 +import Foreign.C.Types (CInt(..)) +#endif + {- | Solution of general polynomial equations, using /gsl_poly_complex_solve/. For example, the three solutions of x^3 + 8 = 0 diff --git a/lib/Numeric/GSL/Root.hs b/lib/Numeric/GSL/Root.hs index 5dfd4d7..9c2e5ab 100644 --- a/lib/Numeric/GSL/Root.hs +++ b/lib/Numeric/GSL/Root.hs @@ -54,7 +54,7 @@ import Data.Packed.Matrix import Numeric.GSL.Internal import Foreign.Ptr(FunPtr, freeHaskellFunPtr) -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import System.IO.Unsafe(unsafePerformIO) ------------------------------------------------------------------------- diff --git a/lib/Numeric/GSL/Vector.hs b/lib/Numeric/GSL/Vector.hs index d0f419b..b8c6d04 100644 --- a/lib/Numeric/GSL/Vector.hs +++ b/lib/Numeric/GSL/Vector.hs @@ -31,7 +31,7 @@ import Data.Complex import Foreign.Marshal.Alloc(free) import Foreign.Marshal.Array(newArray) import Foreign.Ptr(Ptr) -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import System.IO.Unsafe(unsafePerformIO) fromei x = fromIntegral (fromEnum x) :: CInt diff --git a/lib/Numeric/LinearAlgebra/LAPACK.hs b/lib/Numeric/LinearAlgebra/LAPACK.hs index 14e121b..d1aa564 100644 --- a/lib/Numeric/LinearAlgebra/LAPACK.hs +++ b/lib/Numeric/LinearAlgebra/LAPACK.hs @@ -47,7 +47,7 @@ import Numeric.Conversion import Numeric.GSL.Vector(vectorMapValR, FunCodeSV(Scale)) import Foreign.Ptr(nullPtr) -import Foreign.C.Types(CInt(..)) +import Foreign.C.Types import Control.Monad(when) import System.IO.Unsafe(unsafePerformIO) -- cgit v1.2.3