diff --git a/README b/README
--- a/README
+++ b/README
@@ -1,7 +1,8 @@
-A simple scientific library for Haskell
----------------------------------------
+-----------------------------------------
+ A simple scientific library for Haskell
+-----------------------------------------
 
-REQUIREMENTS
+REQUIREMENTS ----------------------------
 
 Development packages of:
 
@@ -16,11 +17,12 @@
 - libgsl0-dev
 - refblas3-dev
 - lapack3-dev
-- atlas3-base-dev
+- atlas3-base-dev (or a version specifically tuned for your machine)
 
-You can also install an atlas version specifically tuned
-for your machine (but see the TESTS section below).
+For ghc-6.8.x you may also need:
 
+- libgmp3-dev.
+
 The following packages are used for simple graphics:
 
 - gnuplot
@@ -29,18 +31,16 @@
 GNU-Octave can be used to check if the results
 obtained by this library are correct.
 
-INSTALLATION
+INSTALLATION --------------------------------------
 
-$ runhaskell Setup.lhs configure --prefix=$HOME
+$ runhaskell Setup.lhs configure --prefix=$HOME --user
 $ runhaskell Setup.lhs build
 $ runhaskell Setup.lhs haddock
-$ runhaskell Setup.lhs install --user
+$ runhaskell Setup.lhs install
 
 See below for installation on Windows.
 
-For undetermined reasons compilation with -O in Linux requires -fvia-C.
-
-TESTS
+TESTS ---------------------------------------------
 
 $ runhaskell examples/tests
 
@@ -48,20 +48,7 @@
 
 $ runhaskell examples/tests --big
 
-NOTE: On Ubuntu 6.06 LTS (Dapper) atlas3-sse2-dev (3.6.0-20)
-produces segmentation faults when working with big matrices 
-on compiled programs. To expose the problem:
-
-$ cd examples
-$ ghc --make -O -fvia-C tests.hs
-$ ./tests --big
-
-If this crashes, just uninstall atlas3-sse2 and use atlas3-base-dev instead.
-Fortunately, atlas3-sse2-dev seems to work well on Ubuntu 7.10 Gutsy.
-A similar problem was reported at:
-    http://article.gmane.org/gmane.linux.debian.devel.bugs.general/323065
-
-EXAMPLES
+EXAMPLES ------------------------------------------------------
 
 $ ghci
 Prelude> :m + Numeric.GSL
@@ -85,8 +72,36 @@
 
 A number of illustrative programs are included in the examples folder.
 
-CHANGES
+KNOWN PROBLEMS / BUGS -------------------------------
 
+- Compilation with -O -fasm on 32-bit machines produces strange
+  NaN's results on certain blas/lapack calls. In these machines
+  the library is automatically compiled -fvia-C, which apparently
+  solves the problem.
+  On 64-bit the default and faster -fasm seems to work well.
+
+- On 64-bit machines the example "minimize.hs", when run from ghci,
+  produces a segmentation fault. It happens in the call to
+  gsl_multimin_fdfminimizer_alloc, inside the C wrapper.
+  If the program is called by runhaskell, it just terminates
+  prematurely, producing no results. Curiously, in compiled mode the
+  program seems to work perfectly well.
+
+- On Ubuntu 6.06 LTS (Dapper) atlas3-sse2-dev (3.6.0-20)
+  produces segmentation faults when working with big matrices 
+  on compiled programs. To expose the problem:
+
+  $ cd examples
+  $ ghc --make -O -fvia-C tests.hs
+  $ ./tests --big
+
+  If this crashes, just uninstall atlas3-sse2 and use atlas3-base-dev instead.
+  Fortunately, atlas3-sse2-dev seems to work well on Ubuntu 7.10 Gutsy.
+  A similar problem was reported at:
+      http://article.gmane.org/gmane.linux.debian.devel.bugs.general/323065
+
+CHANGES ---------------------------------------------------------
+
 This is a new version of the library previously known as GSLHaskell.
 It has been renamed to "hmatrix" because only a small part of GSL is actually
 available, and most linear algebra is based on LAPACK.
@@ -108,7 +123,7 @@
 
 Old GSLHaskell code will work with small modifications.
 
-INSTALLATION ON WINDOWS
+INSTALLATION ON WINDOWS ----------------------------------------
 
 1) Download the developer files gsl-1.8-lib.zip from
    http://gnuwin32.sourceforge.net/packages/gsl.htm
@@ -150,9 +165,10 @@
 
 The examples using graphics do not yet work in windows.
 
-ACKNOWLEDGEMENTS
+ACKNOWLEDGEMENTS -----------------------------------------------------
 
-I thank Henning Thielemann and all the people in the Haskell mailing lists for their help.
+I thank Henning Thielemann and all the people in the Haskell mailing
+lists for their help.
 
 - Nico Mahlo discovered a bug in the eigendecomposition wrapper.
 
@@ -168,3 +184,7 @@
 - Antti Siira discovered a bug in the plotting functions.
 
 - Paulo Tanimoto helped to fix the configuration of the required libraries.
+  He also discovered the segfault of minimize.hs in ghci.
+
+- Xiao-Yong Jin reported a bug on x86_64 caused by the assumptions in f2c.h,
+  which are wrong for this architecture.
diff --git a/examples/kalman.hs b/examples/kalman.hs
--- a/examples/kalman.hs
+++ b/examples/kalman.hs
@@ -26,12 +26,12 @@
 kalman :: System -> State -> Measurement -> State
 kalman (System f h q r) (State x p) z = State x' p' where
     px = f <> x                            -- prediction
-    pq = f <> p <> trans f                 -- its covariance
+    pq = f <> p <> trans f + q             -- its covariance
     y  = z - h <> px                       -- residue
     cy = h <> pq <> trans h + r            -- its covariance
     k  = pq <> trans h <> inv cy           -- kalman gain
     x' = px + k <> y                       -- new state
-    p' = (ident (dim x) - k <> h) <> pq   -- its covariance
+    p' = (ident (dim x) - k <> h) <> pq    -- its covariance
 
 sys = System f h q r
 
@@ -49,5 +49,3 @@
     print $ fromRows $ take 10 (map sX xs)
     mapM_ (print . sP) $ take 10 xs
     mplot (evolution 20 (xs,des))
-
---(<>) = multiply
diff --git a/examples/tests.hs b/examples/tests.hs
--- a/examples/tests.hs
+++ b/examples/tests.hs
@@ -21,14 +21,16 @@
 
 -- relative error
 dist :: (Normed t, Num t) => t -> t -> Double
-dist a b = f nab na nb
+dist a b = r
     where norm = pnorm Infinity
           na = norm a
           nb = norm b
           nab = norm (a-b)
-          f _ a 0 = a
-          f _ 0 b = b
-          f d a b = d / max a b
+          mx = max na nb
+          mn = min na nb
+          r = if mn < eps
+                then mx
+                else nab/mx
 
 infixl 4 |~|
 a |~| b = a :~10~: b
diff --git a/hmatrix.cabal b/hmatrix.cabal
--- a/hmatrix.cabal
+++ b/hmatrix.cabal
@@ -1,5 +1,5 @@
 Name:               hmatrix
-Version:            0.1.1.0
+Version:            0.2.0.0
 License:            GPL
 License-file:       LICENSE
 Author:             Alberto Ruiz
@@ -13,7 +13,7 @@
                     .
                     More information: <http://alberrto.googlepages.com/gslhaskell>
 Category:           Numerical, Math
-tested-with:        GHC ==6.6.1, GHC ==6.8.1
+tested-with:        GHC ==6.6.1, GHC ==6.8.1, GHC ==6.8.2
 
 cabal-version:      >=1.2
 
@@ -31,7 +31,10 @@
     if os(windows)
       ghc-options:      -fasm
     else
-      ghc-options:      -fvia-C
+      if arch(x86_64)
+         ghc-options:   -fasm
+      else
+         ghc-options:   -fvia-C
 
     Build-Depends:      haskell98
     Extensions:         ForeignFunctionInterface
@@ -48,7 +51,6 @@
                         Numeric.GSL.Polynomials,
                         Numeric.GSL.Minimization,
                         Numeric.GSL.Special,
-                        Numeric.GSL.Special.Internal,
                         Numeric.GSL.Special.Gamma,
                         Numeric.GSL.Special.Erf,
                         Numeric.GSL.Special.Airy,
@@ -86,7 +88,8 @@
     other-modules:      Data.Packed.Internal,
                         Data.Packed.Internal.Common,
                         Data.Packed.Internal.Vector,
-                        Data.Packed.Internal.Matrix
+                        Data.Packed.Internal.Matrix,
+                        Numeric.GSL.Special.Internal
     C-sources:          lib/Data/Packed/Internal/auxi.c,
                         lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c,
                         lib/Numeric/GSL/gsl-aux.c
diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs
--- a/lib/Data/Packed/Internal/Common.hs
+++ b/lib/Data/Packed/Internal/Common.hs
@@ -59,6 +59,10 @@
 infixl 0 //
 (//) = flip ($)
 
+-- | specialized fromIntegral
+fi :: Int -> CInt
+fi = fromIntegral
+
 -- hmm..
 ww2 w1 o1 w2 o2 f = w1 o1 $ \a1 -> w2 o2 $ \a2 -> f a1 a2
 ww3 w1 o1 w2 o2 w3 o3 f = w1 o1 $ \a1 -> ww2 w2 o2 w3 o3 (f a1)
@@ -73,7 +77,7 @@
 
 -- GSL error codes are <= 1024
 -- | error codes for the auxiliary functions required by the wrappers
-errorCode :: Int -> String
+errorCode :: CInt -> String
 errorCode 2000 = "bad size"
 errorCode 2001 = "bad function code"
 errorCode 2002 = "memory problem"
@@ -85,7 +89,7 @@
 errorCode n    = "code "++show n
 
 -- | check the error code
-check :: String -> IO Int -> IO ()
+check :: String -> IO CInt -> IO ()
 check msg f = do
     err <- f
     when (err/=0) $ if err > 1024
@@ -97,48 +101,51 @@
     return ()
 
 -- | description of GSL error codes
-foreign import ccall "auxi.h gsl_strerror" gsl_strerror :: Int -> IO (Ptr CChar)
-
-
-{- | conversion of Haskell functions into function pointers that can be used in the C side
--}
-foreign import ccall "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) 
+foreign import ccall "auxi.h gsl_strerror" gsl_strerror :: CInt -> IO (Ptr CChar)
 
 ---------------------------------------------------
 -- ugly, but my haddock version doesn't understand
 -- yet infix type constructors
 ---------------------------------------------------
----------- signatures of the C functions -------
-------------------------------------------------
-type PD = Ptr Double                          --
-type PC = Ptr (Complex Double)                --
-type TV = Int -> PD -> IO Int                 --
-type TVV = Int -> PD -> TV                    --
-type TVVV = Int -> PD -> TVV                  --
-type TM = Int -> Int -> PD -> IO Int          --
-type TMM =  Int -> Int -> PD -> TM            --
-type TMMM =  Int -> Int -> PD -> TMM          --
-type TVM = Int -> PD -> TM                    --
-type TVVM = Int -> PD -> TVM                  --
-type TMV = Int -> Int -> PD -> TV             --
-type TMVM = Int -> Int -> PD -> TVM           --
-type TMMVM = Int -> Int -> PD -> TMVM         --
-type TCM = Int -> Int -> PC -> IO Int         --
-type TCVCM = Int -> PC -> TCM                 --
-type TCMCVCM = Int -> Int -> PC -> TCVCM      --
-type TMCMCVCM = Int -> Int -> PD -> TCMCVCM   --
-type TCMCMCVCM = Int -> Int -> PC -> TCMCVCM  --
-type TCMCM = Int -> Int -> PC -> TCM          --
-type TVCM = Int -> PD -> TCM                  --
-type TCMVCM = Int -> Int -> PC -> TVCM        --
-type TCMCMVCM = Int -> Int -> PC -> TCMVCM    --
-type TCMCMCM = Int -> Int -> PC -> TCMCM      --
-type TCV = Int -> PC -> IO Int                --
-type TCVCV = Int -> PC -> TCV                 --
-type TCVCVCV = Int -> PC -> TCVCV             --
-type TCMCV = Int -> Int -> PC -> TCV          --
-type TVCV = Int -> PD -> TCV                  --
-type TCVM = Int -> PC -> TM                   --
-type TMCVM = Int -> Int -> PD -> TCVM         --
-type TMMCVM = Int -> Int -> PD -> TMCVM       --
-------------------------------------------------
+---------- signatures of the C functions ---------
+--------------------------------------------------
+type PD = Ptr Double                            --
+type PC = Ptr (Complex Double)                  --
+type TV = CInt -> PD -> IO CInt                 --
+type TVV = CInt -> PD -> TV                     --
+type TVVV = CInt -> PD -> TVV                   --
+type TM = CInt -> CInt -> PD -> IO CInt         --
+type TMM =  CInt -> CInt -> PD -> TM            --
+type TVMM = CInt -> PD -> TMM                   --
+type TMVMM = CInt -> CInt -> PD -> TVMM         --
+type TMMM =  CInt -> CInt -> PD -> TMM          --
+type TVM = CInt -> PD -> TM                     --
+type TVVM = CInt -> PD -> TVM                   --
+type TMV = CInt -> CInt -> PD -> TV             --
+type TMMV = CInt -> CInt -> PD -> TMV           --
+type TMVM = CInt -> CInt -> PD -> TVM           --
+type TMMVM = CInt -> CInt -> PD -> TMVM         --
+type TCM = CInt -> CInt -> PC -> IO CInt        --
+type TCVCM = CInt -> PC -> TCM                  --
+type TCMCVCM = CInt -> CInt -> PC -> TCVCM      --
+type TMCMCVCM = CInt -> CInt -> PD -> TCMCVCM   --
+type TCMCMCVCM = CInt -> CInt -> PC -> TCMCVCM  --
+type TCMCM = CInt -> CInt -> PC -> TCM          --
+type TVCM = CInt -> PD -> TCM                   --
+type TCMVCM = CInt -> CInt -> PC -> TVCM        --
+type TCMCMVCM = CInt -> CInt -> PC -> TCMVCM    --
+type TCMCMCM = CInt -> CInt -> PC -> TCMCM      --
+type TCV = CInt -> PC -> IO CInt                --
+type TCVCV = CInt -> PC -> TCV                  --
+type TCVCVCV = CInt -> PC -> TCVCV              --
+type TCMCV = CInt -> CInt -> PC -> TCV          --
+type TVCV = CInt -> PD -> TCV                   --
+type TCVM = CInt -> PC -> TM                    --
+type TMCVM = CInt -> CInt -> PD -> TCVM         --
+type TMMCVM = CInt -> CInt -> PD -> TMCVM       --
+--------------------------------------------------
+
+type TauxMul a = CInt -> CInt -> CInt -> Ptr a
+               -> CInt -> CInt -> CInt -> Ptr a
+               -> CInt -> CInt -> Ptr a
+               -> IO CInt
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs
--- a/lib/Data/Packed/Internal/Matrix.hs
+++ b/lib/Data/Packed/Internal/Matrix.hs
@@ -83,13 +83,13 @@
 withMatrix MC {rows = r, cols = c, cdat = d } f =
     withForeignPtr (fptr d) $ \p -> do
         let m g = do
-            g r c p
+            g (fi r) (fi c) p
         f m
 
 withMatrix MF {rows = r, cols = c, fdat = d } f =
     withForeignPtr (fptr d) $ \p -> do
         let m g = do
-            g r c p
+            g (fi r) (fi c) p
         f m
 
 {- | Creates a vector by concatenation of rows
@@ -247,22 +247,20 @@
             v <- createVector (dim d)
             withForeignPtr (fptr d) $ \pd ->
                 withForeignPtr (fptr v) $ \pv ->
-                    fun r1 c1 pd r2 c2 pv // check "transdataAux"
+                    fun (fi r1) (fi c1) pd (fi r2) (fi c2) pv // check "transdataAux"
             -- putStrLn $ "---> transdataAux" ++ show (toList d) ++ show (toList v)
             return v
   where r1 = dim d `div` c1
         r2 = dim d `div` c2
         noneed = r1 == 1 || c1 == 1
 
-foreign import ccall unsafe "auxi.h transR"
-    ctransR :: TMM -- Double ::> Double ::> IO Int
-foreign import ccall unsafe "auxi.h transC"
-    ctransC :: TCMCM -- Complex Double ::> Complex Double ::> IO Int
+foreign import ccall unsafe "auxi.h transR" ctransR :: TMM
+foreign import ccall unsafe "auxi.h transC" ctransC :: TCMCM
 
 ------------------------------------------------------------------
 
-gmatC MF { rows = r, cols = c } p f = f 1 c r p
-gmatC MC { rows = r, cols = c } p f = f 0 r c p
+gmatC MF { rows = r, cols = c } p f = f 1 (fi c) (fi r) p
+gmatC MC { rows = r, cols = c } p f = f 0 (fi r) (fi c) p
 
 dtt MC { cdat = d } = d
 dtt MF { fdat = d } = d
@@ -277,18 +275,10 @@
     return r
 
 multiplyR = multiplyAux cmultiplyR
-foreign import ccall unsafe "auxi.h multiplyR"
-    cmultiplyR :: Int -> Int -> Int -> Ptr Double
-               -> Int -> Int -> Int -> Ptr Double
-               -> Int -> Int -> Ptr Double
-               -> IO Int
+foreign import ccall unsafe "auxi.h multiplyR" cmultiplyR :: TauxMul Double
 
 multiplyC = multiplyAux cmultiplyC
-foreign import ccall unsafe "auxi.h multiplyC"
-    cmultiplyC :: Int -> Int -> Int -> Ptr (Complex Double)
-               -> Int -> Int -> Int -> Ptr (Complex Double)
-               -> Int -> Int -> Ptr (Complex Double)
-               -> IO Int
+foreign import ccall unsafe "auxi.h multiplyC" cmultiplyC :: TauxMul (Complex Double)
 
 -- | matrix product
 multiply :: (Element a) => Matrix a -> Matrix a -> Matrix a
@@ -301,9 +291,9 @@
 subMatrixR (r0,c0) (rt,ct) x' = unsafePerformIO $ do
     r <- createMatrix RowMajor rt ct
     let x = cmat x'
-    app2 (c_submatrixR r0 (r0+rt-1) c0 (c0+ct-1)) mat x mat r "subMatrixR"
+    app2 (c_submatrixR (fi r0) (fi $ r0+rt-1) (fi c0) (fi $ c0+ct-1)) mat x mat r "subMatrixR"
     return r
-foreign import ccall "auxi.h submatrixR" c_submatrixR :: Int -> Int -> Int -> Int -> TMM
+foreign import ccall "auxi.h submatrixR" c_submatrixR :: CInt -> CInt -> CInt -> CInt -> TMM
 
 -- | extraction of a submatrix from a complex matrix
 subMatrixC :: (Int,Int) -> (Int,Int) -> Matrix (Complex Double) -> Matrix (Complex Double)
@@ -353,13 +343,11 @@
 
 constantR :: Double -> Int -> Vector Double
 constantR = constantAux cconstantR
-foreign import ccall "auxi.h constantR"
-    cconstantR :: Ptr Double -> TV -- Double :> IO Int
+foreign import ccall "auxi.h constantR" cconstantR :: Ptr Double -> TV
 
 constantC :: Complex Double -> Int -> Vector (Complex Double)
 constantC = constantAux cconstantC
-foreign import ccall "auxi.h constantC"
-    cconstantC :: Ptr (Complex Double) -> TCV -- Complex Double :> IO Int
+foreign import ccall "auxi.h constantC" cconstantC :: Ptr (Complex Double) -> TCV
 
 {- | creates a vector with a given number of equal components:
 
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs
--- a/lib/Data/Packed/Internal/Vector.hs
+++ b/lib/Data/Packed/Internal/Vector.hs
@@ -26,20 +26,11 @@
                   , fptr :: ForeignPtr t     -- ^ foreign pointer to the memory block
                   }
 
---ptr (V _ fptr) = unsafeForeignPtrToPtr fptr
-
--- | signature of foreign functions admitting C-style vectors
-type Vc t s = Int -> Ptr t -> s
--- not yet admitted by my haddock version
--- infixr 5 :>
--- type t :> s = Vc t s
-
-
 vec = withVector
 
 withVector (V n fp) f = withForeignPtr fp $ \p -> do
     let v g = do
-        g n p
+        g (fi n) p
     f v
 
 -- | allocates memory for a new vector
diff --git a/lib/Numeric/GSL/Differentiation.hs b/lib/Numeric/GSL/Differentiation.hs
--- a/lib/Numeric/GSL/Differentiation.hs
+++ b/lib/Numeric/GSL/Differentiation.hs
@@ -23,10 +23,11 @@
 ) where
 
 import Foreign
-import Data.Packed.Internal(mkfun,check,(//))
+import Foreign.C.Types(CInt)
+import Data.Packed.Internal(check,(//))
 
 derivGen ::
-    Int                   -- ^ type: 0 central, 1 forward, 2 backward
+    CInt                   -- ^ type: 0 central, 1 forward, 2 backward
     -> Double             -- ^ initial step size
     -> (Double -> Double) -- ^ function
     -> Double             -- ^ point where the derivative is taken
@@ -45,8 +46,8 @@
     return result
 
 foreign import ccall "gsl-aux.h deriv" 
- c_deriv :: Int -> FunPtr (Double -> Ptr () -> Double) -> Double -> Double 
-                    -> Ptr Double -> Ptr Double -> IO Int
+ c_deriv :: CInt -> FunPtr (Double -> Ptr () -> Double) -> Double -> Double 
+                    -> Ptr Double -> Ptr Double -> IO CInt
 
 
 {- | Adaptive central difference algorithm, /gsl_deriv_central/. For example:
@@ -77,3 +78,7 @@
                 -> Double               -- ^ point where the derivative is taken
                 -> (Double, Double)     -- ^ result and absolute error
 derivBackward = derivGen 2
+
+{- | conversion of Haskell functions into function pointers that can be used in the C side
+-}
+foreign import ccall "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) 
diff --git a/lib/Numeric/GSL/Fourier.hs b/lib/Numeric/GSL/Fourier.hs
--- a/lib/Numeric/GSL/Fourier.hs
+++ b/lib/Numeric/GSL/Fourier.hs
@@ -23,13 +23,14 @@
 import Data.Packed.Internal
 import Complex
 import Foreign
+import Foreign.C.Types(CInt)
 
 genfft code v = unsafePerformIO $ do
     r <- createVector (dim v)
     app2 (c_fft code) vec v vec r "fft"
     return r
 
-foreign import ccall "gsl-aux.h fft" c_fft ::  Int -> TCVCV
+foreign import ccall "gsl-aux.h fft" c_fft ::  CInt -> TCVCV
 
 
 {- | Fast 1D Fourier transform of a 'Vector' @(@'Complex' 'Double'@)@ using /gsl_fft_complex_forward/. It uses the same scaling conventions as GNU Octave.
diff --git a/lib/Numeric/GSL/Integration.hs b/lib/Numeric/GSL/Integration.hs
--- a/lib/Numeric/GSL/Integration.hs
+++ b/lib/Numeric/GSL/Integration.hs
@@ -21,9 +21,14 @@
 ) where
 
 import Foreign
-import Data.Packed.Internal(mkfun,check,(//))
+import Foreign.C.Types(CInt)
+import Data.Packed.Internal(check,(//))
 
 
+{- | conversion of Haskell functions into function pointers that can be used in the C side
+-}
+foreign import ccall "wrapper" mkfun:: (Double -> Ptr() -> Double) -> IO( FunPtr (Double -> Ptr() -> Double)) 
+
 --------------------------------------------------------------------
 {- | Numerical integration using /gsl_integration_qags/ (adaptive integration with singularities). For example:
 
@@ -44,7 +49,7 @@
     r <- malloc
     e <- malloc
     fp <- mkfun (\x _ -> f x) 
-    c_integrate_qags fp a b prec n r e // check "integrate_qags"
+    c_integrate_qags fp a b prec (fromIntegral n) r e // check "integrate_qags"
     vr <- peek r
     ve <- peek e
     let result = (vr,ve)
@@ -54,8 +59,8 @@
     return result
 
 foreign import ccall "gsl-aux.h integrate_qags" 
- c_integrate_qags :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double -> Int 
-                     -> Ptr Double -> Ptr Double -> IO Int
+ c_integrate_qags :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double -> CInt
+                     -> Ptr Double -> Ptr Double -> IO CInt
 
 -----------------------------------------------------------------
 {- | Numerical integration using /gsl_integration_qng/ (useful for fast integration of smooth functions). For example:
@@ -86,5 +91,4 @@
 
 foreign import ccall "gsl-aux.h integrate_qng" 
  c_integrate_qng :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double 
-                    -> Ptr Double -> Ptr Double -> IO Int
-
+                    -> Ptr Double -> Ptr Double -> IO CInt
diff --git a/lib/Numeric/GSL/Matrix.hs b/lib/Numeric/GSL/Matrix.hs
--- a/lib/Numeric/GSL/Matrix.hs
+++ b/lib/Numeric/GSL/Matrix.hs
@@ -179,10 +179,6 @@
         c = cols qrp
 foreign import ccall "gsl-aux.h QRunpack" c_qrUnpack :: TMVMM
 
-
-type TMMV = Int -> Int -> PD -> TMV
-type TMVMM = Int -> Int -> PD -> Int -> PD -> TMM
-
 {- | Cholesky decomposition of a symmetric positive definite real matrix using /gsl_linalg_cholesky_decomp/.
 
 @\> chol $ (2><2) [1,2,
diff --git a/lib/Numeric/GSL/Minimization.hs b/lib/Numeric/GSL/Minimization.hs
--- a/lib/Numeric/GSL/Minimization.hs
+++ b/lib/Numeric/GSL/Minimization.hs
@@ -24,6 +24,7 @@
 import Data.Packed.Internal
 import Data.Packed.Matrix
 import Foreign
+import Foreign.C.Types(CInt)
 
 -------------------------------------------------------------------------
 
@@ -85,7 +86,7 @@
     fp <- mkVecfun (iv (f.toList))
     rawpath <- ww2 withVector xiv withVector szv $ \xiv' szv' ->
                    createMIO maxit (n+3)
-                         (c_minimizeNMSimplex fp tol maxit // xiv' // szv')
+                         (c_minimizeNMSimplex fp tol (fi maxit) // xiv' // szv')
                          "minimizeNMSimplex"
     let it = round (rawpath @@> (maxit-1,0))
         path = takeRows it rawpath
@@ -95,8 +96,7 @@
 
 
 foreign import ccall "gsl-aux.h minimize"
-    c_minimizeNMSimplex:: FunPtr (Int -> Ptr Double -> Double) -> Double -> Int
-                       -> TVVM
+    c_minimizeNMSimplex:: FunPtr (CInt -> Ptr Double -> Double) -> Double -> CInt -> TVVM
 
 ----------------------------------------------------------------------------------
 
@@ -151,7 +151,7 @@
     dfp <- mkVecVecfun (aux_vTov df')
     rawpath <- withVector xiv $ \xiv' ->
                     createMIO maxit (n+2)
-                         (c_minimizeConjugateGradient fp dfp istep minimpar tol maxit // xiv')
+                         (c_minimizeConjugateGradient fp dfp istep minimpar tol (fi maxit) // xiv')
                          "minimizeDerivV"
     let it = round (rawpath @@> (maxit-1,0))
         path = takeRows it rawpath
@@ -162,36 +162,36 @@
 
 
 foreign import ccall "gsl-aux.h minimizeWithDeriv"
-    c_minimizeConjugateGradient :: FunPtr (Int -> Ptr Double -> Double)
-                                -> FunPtr (Int -> Ptr Double -> Ptr Double -> IO ())
-                                -> Double -> Double -> Double -> Int
+    c_minimizeConjugateGradient :: FunPtr (CInt -> Ptr Double -> Double)
+                                -> FunPtr (CInt -> Ptr Double -> Ptr Double -> IO ())
+                                -> Double -> Double -> Double -> CInt
                                 -> TVM
 
 ---------------------------------------------------------------------
-iv :: (Vector Double -> Double) -> (Int -> Ptr Double -> Double)
-iv f n p = f (createV n copy "iv") where
+iv :: (Vector Double -> Double) -> (CInt -> Ptr Double -> Double)
+iv f n p = f (createV (fromIntegral n) copy "iv") where
     copy n' q = do
-        copyArray q p n'
+        copyArray q p (fromIntegral n')
         return 0
 
 -- | conversion of Haskell functions into function pointers that can be used in the C side
 foreign import ccall "wrapper"
-    mkVecfun :: (Int -> Ptr Double -> Double)
-             -> IO( FunPtr (Int -> Ptr Double -> Double))
+    mkVecfun :: (CInt -> Ptr Double -> Double)
+             -> IO( FunPtr (CInt -> Ptr Double -> Double))
 
 -- | another required conversion
 foreign import ccall "wrapper"
-    mkVecVecfun :: (Int -> Ptr Double -> Ptr Double -> IO ())
-                -> IO (FunPtr (Int -> Ptr Double -> Ptr Double->IO()))
+    mkVecVecfun :: (CInt -> Ptr Double -> Ptr Double -> IO ())
+                -> IO (FunPtr (CInt -> Ptr Double -> Ptr Double->IO()))
 
-aux_vTov :: (Vector Double -> Vector Double) -> (Int -> Ptr Double -> Ptr Double -> IO())
+aux_vTov :: (Vector Double -> Vector Double) -> (CInt -> Ptr Double -> Ptr Double -> IO())
 aux_vTov f n p r = g where
     V {fptr = pr} = f x
-    x = createV n copy "aux_vTov"
+    x = createV (fromIntegral n) copy "aux_vTov"
     copy n' q = do
-        copyArray q p n'
+        copyArray q p (fromIntegral n')
         return 0
-    g = withForeignPtr pr $ \p' -> copyArray r p' n
+    g = withForeignPtr pr $ \p' -> copyArray r p' (fromIntegral n)
 
 --------------------------------------------------------------------
 
diff --git a/lib/Numeric/GSL/Special/Airy.hs b/lib/Numeric/GSL/Special/Airy.hs
--- a/lib/Numeric/GSL/Special/Airy.hs
+++ b/lib/Numeric/GSL/Special/Airy.hs
@@ -9,14 +9,13 @@
 
 Wrappers for selected functions described at:
 
-<http://www.gnu.org/software/gsl/manual/html_node/Airy-Functions-and-Derivatives.html>
+<http://www.google.com/search?q=gsl_sf_airy.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 
 -}
 ------------------------------------------------------------
 
 module Numeric.GSL.Special.Airy(
-  Precision (..)
-, airy_Ai_e
+  airy_Ai_e
 , airy_Ai
 , airy_Bi_e
 , airy_Bi
@@ -39,128 +38,178 @@
 , airy_zero_Ai_deriv_e
 , airy_zero_Ai_deriv
 , airy_zero_Bi_deriv_e
-, airy_zero_Bi_deriv
+, airy_zero_Bi_deriv,
+Precision(..)
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_airy_Ai_e(double x,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Ai_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Ai_e :: Double -> Precision -> (Double,Double)
 airy_Ai_e x mode = createSFR "airy_Ai_e" $ gsl_sf_airy_Ai_e x  (precCode mode)
-foreign import ccall "airy.h gsl_sf_airy_Ai_e" gsl_sf_airy_Ai_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_Ai_e" gsl_sf_airy_Ai_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_Ai(double x,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Ai&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Ai :: Double -> Precision -> Double
 airy_Ai x mode = gsl_sf_airy_Ai x  (precCode mode)
 foreign import ccall "airy.h gsl_sf_airy_Ai" gsl_sf_airy_Ai :: Double -> Gsl_mode_t -> Double
 
 -- | wrapper for int gsl_sf_airy_Bi_e(double x,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Bi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Bi_e :: Double -> Precision -> (Double,Double)
 airy_Bi_e x mode = createSFR "airy_Bi_e" $ gsl_sf_airy_Bi_e x  (precCode mode)
-foreign import ccall "airy.h gsl_sf_airy_Bi_e" gsl_sf_airy_Bi_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_Bi_e" gsl_sf_airy_Bi_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_Bi(double x,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Bi&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Bi :: Double -> Precision -> Double
 airy_Bi x mode = gsl_sf_airy_Bi x  (precCode mode)
 foreign import ccall "airy.h gsl_sf_airy_Bi" gsl_sf_airy_Bi :: Double -> Gsl_mode_t -> Double
 
 -- | wrapper for int gsl_sf_airy_Ai_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Ai_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Ai_scaled_e :: Double -> Precision -> (Double,Double)
 airy_Ai_scaled_e x mode = createSFR "airy_Ai_scaled_e" $ gsl_sf_airy_Ai_scaled_e x  (precCode mode)
-foreign import ccall "airy.h gsl_sf_airy_Ai_scaled_e" gsl_sf_airy_Ai_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_Ai_scaled_e" gsl_sf_airy_Ai_scaled_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_Ai_scaled(double x,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Ai_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Ai_scaled :: Double -> Precision -> Double
 airy_Ai_scaled x mode = gsl_sf_airy_Ai_scaled x  (precCode mode)
 foreign import ccall "airy.h gsl_sf_airy_Ai_scaled" gsl_sf_airy_Ai_scaled :: Double -> Gsl_mode_t -> Double
 
 -- | wrapper for int gsl_sf_airy_Bi_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Bi_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Bi_scaled_e :: Double -> Precision -> (Double,Double)
 airy_Bi_scaled_e x mode = createSFR "airy_Bi_scaled_e" $ gsl_sf_airy_Bi_scaled_e x  (precCode mode)
-foreign import ccall "airy.h gsl_sf_airy_Bi_scaled_e" gsl_sf_airy_Bi_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_Bi_scaled_e" gsl_sf_airy_Bi_scaled_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_Bi_scaled(double x,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Bi_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Bi_scaled :: Double -> Precision -> Double
 airy_Bi_scaled x mode = gsl_sf_airy_Bi_scaled x  (precCode mode)
 foreign import ccall "airy.h gsl_sf_airy_Bi_scaled" gsl_sf_airy_Bi_scaled :: Double -> Gsl_mode_t -> Double
 
 -- | wrapper for int gsl_sf_airy_Ai_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Ai_deriv_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Ai_deriv_e :: Double -> Precision -> (Double,Double)
 airy_Ai_deriv_e x mode = createSFR "airy_Ai_deriv_e" $ gsl_sf_airy_Ai_deriv_e x  (precCode mode)
-foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_e" gsl_sf_airy_Ai_deriv_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_e" gsl_sf_airy_Ai_deriv_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_Ai_deriv(double x,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Ai_deriv&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Ai_deriv :: Double -> Precision -> Double
 airy_Ai_deriv x mode = gsl_sf_airy_Ai_deriv x  (precCode mode)
 foreign import ccall "airy.h gsl_sf_airy_Ai_deriv" gsl_sf_airy_Ai_deriv :: Double -> Gsl_mode_t -> Double
 
 -- | wrapper for int gsl_sf_airy_Bi_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Bi_deriv_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Bi_deriv_e :: Double -> Precision -> (Double,Double)
 airy_Bi_deriv_e x mode = createSFR "airy_Bi_deriv_e" $ gsl_sf_airy_Bi_deriv_e x  (precCode mode)
-foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_e" gsl_sf_airy_Bi_deriv_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_e" gsl_sf_airy_Bi_deriv_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_Bi_deriv(double x,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Bi_deriv&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Bi_deriv :: Double -> Precision -> Double
 airy_Bi_deriv x mode = gsl_sf_airy_Bi_deriv x  (precCode mode)
 foreign import ccall "airy.h gsl_sf_airy_Bi_deriv" gsl_sf_airy_Bi_deriv :: Double -> Gsl_mode_t -> Double
 
 -- | wrapper for int gsl_sf_airy_Ai_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Ai_deriv_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Ai_deriv_scaled_e :: Double -> Precision -> (Double,Double)
 airy_Ai_deriv_scaled_e x mode = createSFR "airy_Ai_deriv_scaled_e" $ gsl_sf_airy_Ai_deriv_scaled_e x  (precCode mode)
-foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_scaled_e" gsl_sf_airy_Ai_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_scaled_e" gsl_sf_airy_Ai_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_Ai_deriv_scaled(double x,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Ai_deriv_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Ai_deriv_scaled :: Double -> Precision -> Double
 airy_Ai_deriv_scaled x mode = gsl_sf_airy_Ai_deriv_scaled x  (precCode mode)
 foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_scaled" gsl_sf_airy_Ai_deriv_scaled :: Double -> Gsl_mode_t -> Double
 
 -- | wrapper for int gsl_sf_airy_Bi_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Bi_deriv_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Bi_deriv_scaled_e :: Double -> Precision -> (Double,Double)
 airy_Bi_deriv_scaled_e x mode = createSFR "airy_Bi_deriv_scaled_e" $ gsl_sf_airy_Bi_deriv_scaled_e x  (precCode mode)
-foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_scaled_e" gsl_sf_airy_Bi_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_scaled_e" gsl_sf_airy_Bi_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_Bi_deriv_scaled(double x,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_Bi_deriv_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 airy_Bi_deriv_scaled :: Double -> Precision -> Double
 airy_Bi_deriv_scaled x mode = gsl_sf_airy_Bi_deriv_scaled x  (precCode mode)
 foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_scaled" gsl_sf_airy_Bi_deriv_scaled :: Double -> Gsl_mode_t -> Double
 
 -- | wrapper for int gsl_sf_airy_zero_Ai_e(int s,gsl_sf_result* result);
-airy_zero_Ai_e :: Int -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_zero_Ai_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+airy_zero_Ai_e :: CInt -> (Double,Double)
 airy_zero_Ai_e s = createSFR "airy_zero_Ai_e" $ gsl_sf_airy_zero_Ai_e s
-foreign import ccall "airy.h gsl_sf_airy_zero_Ai_e" gsl_sf_airy_zero_Ai_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_zero_Ai_e" gsl_sf_airy_zero_Ai_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_zero_Ai(int s);
-airy_zero_Ai :: Int -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_zero_Ai&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+airy_zero_Ai :: CInt -> Double
 airy_zero_Ai = gsl_sf_airy_zero_Ai
-foreign import ccall "airy.h gsl_sf_airy_zero_Ai" gsl_sf_airy_zero_Ai :: Int -> Double
+foreign import ccall "airy.h gsl_sf_airy_zero_Ai" gsl_sf_airy_zero_Ai :: CInt -> Double
 
 -- | wrapper for int gsl_sf_airy_zero_Bi_e(int s,gsl_sf_result* result);
-airy_zero_Bi_e :: Int -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_zero_Bi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+airy_zero_Bi_e :: CInt -> (Double,Double)
 airy_zero_Bi_e s = createSFR "airy_zero_Bi_e" $ gsl_sf_airy_zero_Bi_e s
-foreign import ccall "airy.h gsl_sf_airy_zero_Bi_e" gsl_sf_airy_zero_Bi_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_zero_Bi_e" gsl_sf_airy_zero_Bi_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_zero_Bi(int s);
-airy_zero_Bi :: Int -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_zero_Bi&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+airy_zero_Bi :: CInt -> Double
 airy_zero_Bi = gsl_sf_airy_zero_Bi
-foreign import ccall "airy.h gsl_sf_airy_zero_Bi" gsl_sf_airy_zero_Bi :: Int -> Double
+foreign import ccall "airy.h gsl_sf_airy_zero_Bi" gsl_sf_airy_zero_Bi :: CInt -> Double
 
 -- | wrapper for int gsl_sf_airy_zero_Ai_deriv_e(int s,gsl_sf_result* result);
-airy_zero_Ai_deriv_e :: Int -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_zero_Ai_deriv_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+airy_zero_Ai_deriv_e :: CInt -> (Double,Double)
 airy_zero_Ai_deriv_e s = createSFR "airy_zero_Ai_deriv_e" $ gsl_sf_airy_zero_Ai_deriv_e s
-foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv_e" gsl_sf_airy_zero_Ai_deriv_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv_e" gsl_sf_airy_zero_Ai_deriv_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_zero_Ai_deriv(int s);
-airy_zero_Ai_deriv :: Int -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_zero_Ai_deriv&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+airy_zero_Ai_deriv :: CInt -> Double
 airy_zero_Ai_deriv = gsl_sf_airy_zero_Ai_deriv
-foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv" gsl_sf_airy_zero_Ai_deriv :: Int -> Double
+foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv" gsl_sf_airy_zero_Ai_deriv :: CInt -> Double
 
 -- | wrapper for int gsl_sf_airy_zero_Bi_deriv_e(int s,gsl_sf_result* result);
-airy_zero_Bi_deriv_e :: Int -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_zero_Bi_deriv_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+airy_zero_Bi_deriv_e :: CInt -> (Double,Double)
 airy_zero_Bi_deriv_e s = createSFR "airy_zero_Bi_deriv_e" $ gsl_sf_airy_zero_Bi_deriv_e s
-foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv_e" gsl_sf_airy_zero_Bi_deriv_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv_e" gsl_sf_airy_zero_Bi_deriv_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_airy_zero_Bi_deriv(int s);
-airy_zero_Bi_deriv :: Int -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_airy_zero_Bi_deriv&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+airy_zero_Bi_deriv :: CInt -> Double
 airy_zero_Bi_deriv = gsl_sf_airy_zero_Bi_deriv
-foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv" gsl_sf_airy_zero_Bi_deriv :: Int -> Double
+foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv" gsl_sf_airy_zero_Bi_deriv :: CInt -> Double
diff --git a/lib/Numeric/GSL/Special/Bessel.hs b/lib/Numeric/GSL/Special/Bessel.hs
--- a/lib/Numeric/GSL/Special/Bessel.hs
+++ b/lib/Numeric/GSL/Special/Bessel.hs
@@ -106,6 +106,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_bessel_J0_e(double x,gsl_sf_result* result);
@@ -113,7 +114,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_J0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_J0_e :: Double -> (Double,Double)
 bessel_J0_e x = createSFR "bessel_J0_e" $ gsl_sf_bessel_J0_e x
-foreign import ccall "bessel.h gsl_sf_bessel_J0_e" gsl_sf_bessel_J0_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_J0_e" gsl_sf_bessel_J0_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_J0(double x);
 --
@@ -127,7 +128,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_J1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_J1_e :: Double -> (Double,Double)
 bessel_J1_e x = createSFR "bessel_J1_e" $ gsl_sf_bessel_J1_e x
-foreign import ccall "bessel.h gsl_sf_bessel_J1_e" gsl_sf_bessel_J1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_J1_e" gsl_sf_bessel_J1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_J1(double x);
 --
@@ -139,30 +140,30 @@
 -- | wrapper for int gsl_sf_bessel_Jn_e(int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Jn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Jn_e :: Int -> Double -> (Double,Double)
+bessel_Jn_e :: CInt -> Double -> (Double,Double)
 bessel_Jn_e n x = createSFR "bessel_Jn_e" $ gsl_sf_bessel_Jn_e n x
-foreign import ccall "bessel.h gsl_sf_bessel_Jn_e" gsl_sf_bessel_Jn_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Jn_e" gsl_sf_bessel_Jn_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Jn(int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Jn&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Jn :: Int -> Double -> Double
+bessel_Jn :: CInt -> Double -> Double
 bessel_Jn = gsl_sf_bessel_Jn
-foreign import ccall "bessel.h gsl_sf_bessel_Jn" gsl_sf_bessel_Jn :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_Jn" gsl_sf_bessel_Jn :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_Jn_array(int nmin,int nmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Jn_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int
+bessel_Jn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 bessel_Jn_array = gsl_sf_bessel_Jn_array
-foreign import ccall "bessel.h gsl_sf_bessel_Jn_array" gsl_sf_bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_Jn_array" gsl_sf_bessel_Jn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_Y0_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Y0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_Y0_e :: Double -> (Double,Double)
 bessel_Y0_e x = createSFR "bessel_Y0_e" $ gsl_sf_bessel_Y0_e x
-foreign import ccall "bessel.h gsl_sf_bessel_Y0_e" gsl_sf_bessel_Y0_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Y0_e" gsl_sf_bessel_Y0_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Y0(double x);
 --
@@ -176,7 +177,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_Y1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_Y1_e :: Double -> (Double,Double)
 bessel_Y1_e x = createSFR "bessel_Y1_e" $ gsl_sf_bessel_Y1_e x
-foreign import ccall "bessel.h gsl_sf_bessel_Y1_e" gsl_sf_bessel_Y1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Y1_e" gsl_sf_bessel_Y1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Y1(double x);
 --
@@ -188,30 +189,30 @@
 -- | wrapper for int gsl_sf_bessel_Yn_e(int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Yn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Yn_e :: Int -> Double -> (Double,Double)
+bessel_Yn_e :: CInt -> Double -> (Double,Double)
 bessel_Yn_e n x = createSFR "bessel_Yn_e" $ gsl_sf_bessel_Yn_e n x
-foreign import ccall "bessel.h gsl_sf_bessel_Yn_e" gsl_sf_bessel_Yn_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Yn_e" gsl_sf_bessel_Yn_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Yn(int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Yn&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Yn :: Int -> Double -> Double
+bessel_Yn :: CInt -> Double -> Double
 bessel_Yn = gsl_sf_bessel_Yn
-foreign import ccall "bessel.h gsl_sf_bessel_Yn" gsl_sf_bessel_Yn :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_Yn" gsl_sf_bessel_Yn :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_Yn_array(int nmin,int nmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Yn_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int
+bessel_Yn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 bessel_Yn_array = gsl_sf_bessel_Yn_array
-foreign import ccall "bessel.h gsl_sf_bessel_Yn_array" gsl_sf_bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_Yn_array" gsl_sf_bessel_Yn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_I0_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_I0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_I0_e :: Double -> (Double,Double)
 bessel_I0_e x = createSFR "bessel_I0_e" $ gsl_sf_bessel_I0_e x
-foreign import ccall "bessel.h gsl_sf_bessel_I0_e" gsl_sf_bessel_I0_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_I0_e" gsl_sf_bessel_I0_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_I0(double x);
 --
@@ -225,7 +226,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_I1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_I1_e :: Double -> (Double,Double)
 bessel_I1_e x = createSFR "bessel_I1_e" $ gsl_sf_bessel_I1_e x
-foreign import ccall "bessel.h gsl_sf_bessel_I1_e" gsl_sf_bessel_I1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_I1_e" gsl_sf_bessel_I1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_I1(double x);
 --
@@ -237,30 +238,30 @@
 -- | wrapper for int gsl_sf_bessel_In_e(int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_In_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_In_e :: Int -> Double -> (Double,Double)
+bessel_In_e :: CInt -> Double -> (Double,Double)
 bessel_In_e n x = createSFR "bessel_In_e" $ gsl_sf_bessel_In_e n x
-foreign import ccall "bessel.h gsl_sf_bessel_In_e" gsl_sf_bessel_In_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_In_e" gsl_sf_bessel_In_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_In(int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_In&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_In :: Int -> Double -> Double
+bessel_In :: CInt -> Double -> Double
 bessel_In = gsl_sf_bessel_In
-foreign import ccall "bessel.h gsl_sf_bessel_In" gsl_sf_bessel_In :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_In" gsl_sf_bessel_In :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_In_array(int nmin,int nmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_In_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int
+bessel_In_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 bessel_In_array = gsl_sf_bessel_In_array
-foreign import ccall "bessel.h gsl_sf_bessel_In_array" gsl_sf_bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_In_array" gsl_sf_bessel_In_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_I0_scaled_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_I0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_I0_scaled_e :: Double -> (Double,Double)
 bessel_I0_scaled_e x = createSFR "bessel_I0_scaled_e" $ gsl_sf_bessel_I0_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled_e" gsl_sf_bessel_I0_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled_e" gsl_sf_bessel_I0_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_I0_scaled(double x);
 --
@@ -274,7 +275,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_I1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_I1_scaled_e :: Double -> (Double,Double)
 bessel_I1_scaled_e x = createSFR "bessel_I1_scaled_e" $ gsl_sf_bessel_I1_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled_e" gsl_sf_bessel_I1_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled_e" gsl_sf_bessel_I1_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_I1_scaled(double x);
 --
@@ -286,30 +287,30 @@
 -- | wrapper for int gsl_sf_bessel_In_scaled_e(int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_In_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_In_scaled_e :: Int -> Double -> (Double,Double)
+bessel_In_scaled_e :: CInt -> Double -> (Double,Double)
 bessel_In_scaled_e n x = createSFR "bessel_In_scaled_e" $ gsl_sf_bessel_In_scaled_e n x
-foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_e" gsl_sf_bessel_In_scaled_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_e" gsl_sf_bessel_In_scaled_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_In_scaled(int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_In_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_In_scaled :: Int -> Double -> Double
+bessel_In_scaled :: CInt -> Double -> Double
 bessel_In_scaled = gsl_sf_bessel_In_scaled
-foreign import ccall "bessel.h gsl_sf_bessel_In_scaled" gsl_sf_bessel_In_scaled :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_In_scaled" gsl_sf_bessel_In_scaled :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_In_scaled_array(int nmin,int nmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_In_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int
+bessel_In_scaled_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 bessel_In_scaled_array = gsl_sf_bessel_In_scaled_array
-foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_array" gsl_sf_bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_array" gsl_sf_bessel_In_scaled_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_K0_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_K0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_K0_e :: Double -> (Double,Double)
 bessel_K0_e x = createSFR "bessel_K0_e" $ gsl_sf_bessel_K0_e x
-foreign import ccall "bessel.h gsl_sf_bessel_K0_e" gsl_sf_bessel_K0_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_K0_e" gsl_sf_bessel_K0_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_K0(double x);
 --
@@ -323,7 +324,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_K1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_K1_e :: Double -> (Double,Double)
 bessel_K1_e x = createSFR "bessel_K1_e" $ gsl_sf_bessel_K1_e x
-foreign import ccall "bessel.h gsl_sf_bessel_K1_e" gsl_sf_bessel_K1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_K1_e" gsl_sf_bessel_K1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_K1(double x);
 --
@@ -335,30 +336,30 @@
 -- | wrapper for int gsl_sf_bessel_Kn_e(int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Kn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Kn_e :: Int -> Double -> (Double,Double)
+bessel_Kn_e :: CInt -> Double -> (Double,Double)
 bessel_Kn_e n x = createSFR "bessel_Kn_e" $ gsl_sf_bessel_Kn_e n x
-foreign import ccall "bessel.h gsl_sf_bessel_Kn_e" gsl_sf_bessel_Kn_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Kn_e" gsl_sf_bessel_Kn_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Kn(int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Kn&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Kn :: Int -> Double -> Double
+bessel_Kn :: CInt -> Double -> Double
 bessel_Kn = gsl_sf_bessel_Kn
-foreign import ccall "bessel.h gsl_sf_bessel_Kn" gsl_sf_bessel_Kn :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_Kn" gsl_sf_bessel_Kn :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_Kn_array(int nmin,int nmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Kn_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int
+bessel_Kn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 bessel_Kn_array = gsl_sf_bessel_Kn_array
-foreign import ccall "bessel.h gsl_sf_bessel_Kn_array" gsl_sf_bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_Kn_array" gsl_sf_bessel_Kn_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_K0_scaled_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_K0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_K0_scaled_e :: Double -> (Double,Double)
 bessel_K0_scaled_e x = createSFR "bessel_K0_scaled_e" $ gsl_sf_bessel_K0_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled_e" gsl_sf_bessel_K0_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled_e" gsl_sf_bessel_K0_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_K0_scaled(double x);
 --
@@ -372,7 +373,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_K1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_K1_scaled_e :: Double -> (Double,Double)
 bessel_K1_scaled_e x = createSFR "bessel_K1_scaled_e" $ gsl_sf_bessel_K1_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled_e" gsl_sf_bessel_K1_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled_e" gsl_sf_bessel_K1_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_K1_scaled(double x);
 --
@@ -384,30 +385,30 @@
 -- | wrapper for int gsl_sf_bessel_Kn_scaled_e(int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Kn_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Kn_scaled_e :: Int -> Double -> (Double,Double)
+bessel_Kn_scaled_e :: CInt -> Double -> (Double,Double)
 bessel_Kn_scaled_e n x = createSFR "bessel_Kn_scaled_e" $ gsl_sf_bessel_Kn_scaled_e n x
-foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_e" gsl_sf_bessel_Kn_scaled_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_e" gsl_sf_bessel_Kn_scaled_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Kn_scaled(int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Kn_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Kn_scaled :: Int -> Double -> Double
+bessel_Kn_scaled :: CInt -> Double -> Double
 bessel_Kn_scaled = gsl_sf_bessel_Kn_scaled
-foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled" gsl_sf_bessel_Kn_scaled :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled" gsl_sf_bessel_Kn_scaled :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_Kn_scaled_array(int nmin,int nmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Kn_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int
+bessel_Kn_scaled_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 bessel_Kn_scaled_array = gsl_sf_bessel_Kn_scaled_array
-foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_array" gsl_sf_bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_array" gsl_sf_bessel_Kn_scaled_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_j0_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_j0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_j0_e :: Double -> (Double,Double)
 bessel_j0_e x = createSFR "bessel_j0_e" $ gsl_sf_bessel_j0_e x
-foreign import ccall "bessel.h gsl_sf_bessel_j0_e" gsl_sf_bessel_j0_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_j0_e" gsl_sf_bessel_j0_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_j0(double x);
 --
@@ -421,7 +422,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_j1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_j1_e :: Double -> (Double,Double)
 bessel_j1_e x = createSFR "bessel_j1_e" $ gsl_sf_bessel_j1_e x
-foreign import ccall "bessel.h gsl_sf_bessel_j1_e" gsl_sf_bessel_j1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_j1_e" gsl_sf_bessel_j1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_j1(double x);
 --
@@ -435,7 +436,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_j2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_j2_e :: Double -> (Double,Double)
 bessel_j2_e x = createSFR "bessel_j2_e" $ gsl_sf_bessel_j2_e x
-foreign import ccall "bessel.h gsl_sf_bessel_j2_e" gsl_sf_bessel_j2_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_j2_e" gsl_sf_bessel_j2_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_j2(double x);
 --
@@ -447,37 +448,37 @@
 -- | wrapper for int gsl_sf_bessel_jl_e(int l,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_jl_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_jl_e :: Int -> Double -> (Double,Double)
+bessel_jl_e :: CInt -> Double -> (Double,Double)
 bessel_jl_e l x = createSFR "bessel_jl_e" $ gsl_sf_bessel_jl_e l x
-foreign import ccall "bessel.h gsl_sf_bessel_jl_e" gsl_sf_bessel_jl_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_jl_e" gsl_sf_bessel_jl_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_jl(int l,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_jl&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_jl :: Int -> Double -> Double
+bessel_jl :: CInt -> Double -> Double
 bessel_jl = gsl_sf_bessel_jl
-foreign import ccall "bessel.h gsl_sf_bessel_jl" gsl_sf_bessel_jl :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_jl" gsl_sf_bessel_jl :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_jl_array(int lmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_jl_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_jl_array :: Int -> Double -> Ptr Double -> Int
+bessel_jl_array :: CInt -> Double -> Ptr Double -> CInt
 bessel_jl_array = gsl_sf_bessel_jl_array
-foreign import ccall "bessel.h gsl_sf_bessel_jl_array" gsl_sf_bessel_jl_array :: Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_jl_array" gsl_sf_bessel_jl_array :: CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_jl_steed_array(int lmax,double x,double* jl_x_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_jl_steed_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int
+bessel_jl_steed_array :: CInt -> Double -> Ptr Double -> CInt
 bessel_jl_steed_array = gsl_sf_bessel_jl_steed_array
-foreign import ccall "bessel.h gsl_sf_bessel_jl_steed_array" gsl_sf_bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_jl_steed_array" gsl_sf_bessel_jl_steed_array :: CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_y0_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_y0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_y0_e :: Double -> (Double,Double)
 bessel_y0_e x = createSFR "bessel_y0_e" $ gsl_sf_bessel_y0_e x
-foreign import ccall "bessel.h gsl_sf_bessel_y0_e" gsl_sf_bessel_y0_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_y0_e" gsl_sf_bessel_y0_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_y0(double x);
 --
@@ -491,7 +492,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_y1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_y1_e :: Double -> (Double,Double)
 bessel_y1_e x = createSFR "bessel_y1_e" $ gsl_sf_bessel_y1_e x
-foreign import ccall "bessel.h gsl_sf_bessel_y1_e" gsl_sf_bessel_y1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_y1_e" gsl_sf_bessel_y1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_y1(double x);
 --
@@ -505,7 +506,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_y2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_y2_e :: Double -> (Double,Double)
 bessel_y2_e x = createSFR "bessel_y2_e" $ gsl_sf_bessel_y2_e x
-foreign import ccall "bessel.h gsl_sf_bessel_y2_e" gsl_sf_bessel_y2_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_y2_e" gsl_sf_bessel_y2_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_y2(double x);
 --
@@ -517,30 +518,30 @@
 -- | wrapper for int gsl_sf_bessel_yl_e(int l,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_yl_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_yl_e :: Int -> Double -> (Double,Double)
+bessel_yl_e :: CInt -> Double -> (Double,Double)
 bessel_yl_e l x = createSFR "bessel_yl_e" $ gsl_sf_bessel_yl_e l x
-foreign import ccall "bessel.h gsl_sf_bessel_yl_e" gsl_sf_bessel_yl_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_yl_e" gsl_sf_bessel_yl_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_yl(int l,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_yl&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_yl :: Int -> Double -> Double
+bessel_yl :: CInt -> Double -> Double
 bessel_yl = gsl_sf_bessel_yl
-foreign import ccall "bessel.h gsl_sf_bessel_yl" gsl_sf_bessel_yl :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_yl" gsl_sf_bessel_yl :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_yl_array(int lmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_yl_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_yl_array :: Int -> Double -> Ptr Double -> Int
+bessel_yl_array :: CInt -> Double -> Ptr Double -> CInt
 bessel_yl_array = gsl_sf_bessel_yl_array
-foreign import ccall "bessel.h gsl_sf_bessel_yl_array" gsl_sf_bessel_yl_array :: Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_yl_array" gsl_sf_bessel_yl_array :: CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_i0_scaled_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_i0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_i0_scaled_e :: Double -> (Double,Double)
 bessel_i0_scaled_e x = createSFR "bessel_i0_scaled_e" $ gsl_sf_bessel_i0_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled_e" gsl_sf_bessel_i0_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled_e" gsl_sf_bessel_i0_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_i0_scaled(double x);
 --
@@ -554,7 +555,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_i1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_i1_scaled_e :: Double -> (Double,Double)
 bessel_i1_scaled_e x = createSFR "bessel_i1_scaled_e" $ gsl_sf_bessel_i1_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled_e" gsl_sf_bessel_i1_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled_e" gsl_sf_bessel_i1_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_i1_scaled(double x);
 --
@@ -568,7 +569,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_i2_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_i2_scaled_e :: Double -> (Double,Double)
 bessel_i2_scaled_e x = createSFR "bessel_i2_scaled_e" $ gsl_sf_bessel_i2_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled_e" gsl_sf_bessel_i2_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled_e" gsl_sf_bessel_i2_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_i2_scaled(double x);
 --
@@ -580,30 +581,30 @@
 -- | wrapper for int gsl_sf_bessel_il_scaled_e(int l,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_il_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_il_scaled_e :: Int -> Double -> (Double,Double)
+bessel_il_scaled_e :: CInt -> Double -> (Double,Double)
 bessel_il_scaled_e l x = createSFR "bessel_il_scaled_e" $ gsl_sf_bessel_il_scaled_e l x
-foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_e" gsl_sf_bessel_il_scaled_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_e" gsl_sf_bessel_il_scaled_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_il_scaled(int l,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_il_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_il_scaled :: Int -> Double -> Double
+bessel_il_scaled :: CInt -> Double -> Double
 bessel_il_scaled = gsl_sf_bessel_il_scaled
-foreign import ccall "bessel.h gsl_sf_bessel_il_scaled" gsl_sf_bessel_il_scaled :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_il_scaled" gsl_sf_bessel_il_scaled :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_il_scaled_array(int lmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_il_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int
+bessel_il_scaled_array :: CInt -> Double -> Ptr Double -> CInt
 bessel_il_scaled_array = gsl_sf_bessel_il_scaled_array
-foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_array" gsl_sf_bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_array" gsl_sf_bessel_il_scaled_array :: CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_k0_scaled_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_k0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_k0_scaled_e :: Double -> (Double,Double)
 bessel_k0_scaled_e x = createSFR "bessel_k0_scaled_e" $ gsl_sf_bessel_k0_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled_e" gsl_sf_bessel_k0_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled_e" gsl_sf_bessel_k0_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_k0_scaled(double x);
 --
@@ -617,7 +618,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_k1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_k1_scaled_e :: Double -> (Double,Double)
 bessel_k1_scaled_e x = createSFR "bessel_k1_scaled_e" $ gsl_sf_bessel_k1_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled_e" gsl_sf_bessel_k1_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled_e" gsl_sf_bessel_k1_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_k1_scaled(double x);
 --
@@ -631,7 +632,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_k2_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_k2_scaled_e :: Double -> (Double,Double)
 bessel_k2_scaled_e x = createSFR "bessel_k2_scaled_e" $ gsl_sf_bessel_k2_scaled_e x
-foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled_e" gsl_sf_bessel_k2_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled_e" gsl_sf_bessel_k2_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_k2_scaled(double x);
 --
@@ -643,30 +644,30 @@
 -- | wrapper for int gsl_sf_bessel_kl_scaled_e(int l,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_kl_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_kl_scaled_e :: Int -> Double -> (Double,Double)
+bessel_kl_scaled_e :: CInt -> Double -> (Double,Double)
 bessel_kl_scaled_e l x = createSFR "bessel_kl_scaled_e" $ gsl_sf_bessel_kl_scaled_e l x
-foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_e" gsl_sf_bessel_kl_scaled_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_e" gsl_sf_bessel_kl_scaled_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_kl_scaled(int l,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_kl_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_kl_scaled :: Int -> Double -> Double
+bessel_kl_scaled :: CInt -> Double -> Double
 bessel_kl_scaled = gsl_sf_bessel_kl_scaled
-foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled" gsl_sf_bessel_kl_scaled :: Int -> Double -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled" gsl_sf_bessel_kl_scaled :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_bessel_kl_scaled_array(int lmax,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_kl_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int
+bessel_kl_scaled_array :: CInt -> Double -> Ptr Double -> CInt
 bessel_kl_scaled_array = gsl_sf_bessel_kl_scaled_array
-foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_array" gsl_sf_bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_array" gsl_sf_bessel_kl_scaled_array :: CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_Jnu_e(double nu,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Jnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_Jnu_e :: Double -> Double -> (Double,Double)
 bessel_Jnu_e nu x = createSFR "bessel_Jnu_e" $ gsl_sf_bessel_Jnu_e nu x
-foreign import ccall "bessel.h gsl_sf_bessel_Jnu_e" gsl_sf_bessel_Jnu_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Jnu_e" gsl_sf_bessel_Jnu_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Jnu(double nu,double x);
 --
@@ -680,7 +681,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_Ynu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_Ynu_e :: Double -> Double -> (Double,Double)
 bessel_Ynu_e nu x = createSFR "bessel_Ynu_e" $ gsl_sf_bessel_Ynu_e nu x
-foreign import ccall "bessel.h gsl_sf_bessel_Ynu_e" gsl_sf_bessel_Ynu_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Ynu_e" gsl_sf_bessel_Ynu_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Ynu(double nu,double x);
 --
@@ -692,16 +693,16 @@
 -- | wrapper for int gsl_sf_bessel_sequence_Jnu_e(double nu,gsl_mode_t mode,size_t size,double* v);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_sequence_Jnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_sequence_Jnu_e :: Double -> Precision -> Size_t -> Ptr Double -> Int
+bessel_sequence_Jnu_e :: Double -> Precision -> Size_t -> Ptr Double -> CInt
 bessel_sequence_Jnu_e nu mode size v = gsl_sf_bessel_sequence_Jnu_e nu  (precCode mode) size v
-foreign import ccall "bessel.h gsl_sf_bessel_sequence_Jnu_e" gsl_sf_bessel_sequence_Jnu_e :: Double -> Gsl_mode_t -> Size_t -> Ptr Double -> Int
+foreign import ccall "bessel.h gsl_sf_bessel_sequence_Jnu_e" gsl_sf_bessel_sequence_Jnu_e :: Double -> Gsl_mode_t -> Size_t -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_bessel_Inu_scaled_e(double nu,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_Inu_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_Inu_scaled_e :: Double -> Double -> (Double,Double)
 bessel_Inu_scaled_e nu x = createSFR "bessel_Inu_scaled_e" $ gsl_sf_bessel_Inu_scaled_e nu x
-foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled_e" gsl_sf_bessel_Inu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled_e" gsl_sf_bessel_Inu_scaled_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Inu_scaled(double nu,double x);
 --
@@ -715,7 +716,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_Inu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_Inu_e :: Double -> Double -> (Double,Double)
 bessel_Inu_e nu x = createSFR "bessel_Inu_e" $ gsl_sf_bessel_Inu_e nu x
-foreign import ccall "bessel.h gsl_sf_bessel_Inu_e" gsl_sf_bessel_Inu_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Inu_e" gsl_sf_bessel_Inu_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Inu(double nu,double x);
 --
@@ -729,7 +730,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_Knu_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_Knu_scaled_e :: Double -> Double -> (Double,Double)
 bessel_Knu_scaled_e nu x = createSFR "bessel_Knu_scaled_e" $ gsl_sf_bessel_Knu_scaled_e nu x
-foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled_e" gsl_sf_bessel_Knu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled_e" gsl_sf_bessel_Knu_scaled_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Knu_scaled(double nu,double x);
 --
@@ -743,7 +744,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_Knu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_Knu_e :: Double -> Double -> (Double,Double)
 bessel_Knu_e nu x = createSFR "bessel_Knu_e" $ gsl_sf_bessel_Knu_e nu x
-foreign import ccall "bessel.h gsl_sf_bessel_Knu_e" gsl_sf_bessel_Knu_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_Knu_e" gsl_sf_bessel_Knu_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_Knu(double nu,double x);
 --
@@ -757,7 +758,7 @@
 --   <http://www.google.com/search?q=gsl_sf_bessel_lnKnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 bessel_lnKnu_e :: Double -> Double -> (Double,Double)
 bessel_lnKnu_e nu x = createSFR "bessel_lnKnu_e" $ gsl_sf_bessel_lnKnu_e nu x
-foreign import ccall "bessel.h gsl_sf_bessel_lnKnu_e" gsl_sf_bessel_lnKnu_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_lnKnu_e" gsl_sf_bessel_lnKnu_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_lnKnu(double nu,double x);
 --
@@ -769,41 +770,41 @@
 -- | wrapper for int gsl_sf_bessel_zero_J0_e(int s,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_zero_J0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_zero_J0_e :: Int -> (Double,Double)
+bessel_zero_J0_e :: CInt -> (Double,Double)
 bessel_zero_J0_e s = createSFR "bessel_zero_J0_e" $ gsl_sf_bessel_zero_J0_e s
-foreign import ccall "bessel.h gsl_sf_bessel_zero_J0_e" gsl_sf_bessel_zero_J0_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_zero_J0_e" gsl_sf_bessel_zero_J0_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_zero_J0(int s);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_zero_J0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_zero_J0 :: Int -> Double
+bessel_zero_J0 :: CInt -> Double
 bessel_zero_J0 = gsl_sf_bessel_zero_J0
-foreign import ccall "bessel.h gsl_sf_bessel_zero_J0" gsl_sf_bessel_zero_J0 :: Int -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_zero_J0" gsl_sf_bessel_zero_J0 :: CInt -> Double
 
 -- | wrapper for int gsl_sf_bessel_zero_J1_e(int s,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_zero_J1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_zero_J1_e :: Int -> (Double,Double)
+bessel_zero_J1_e :: CInt -> (Double,Double)
 bessel_zero_J1_e s = createSFR "bessel_zero_J1_e" $ gsl_sf_bessel_zero_J1_e s
-foreign import ccall "bessel.h gsl_sf_bessel_zero_J1_e" gsl_sf_bessel_zero_J1_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_zero_J1_e" gsl_sf_bessel_zero_J1_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_zero_J1(int s);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_zero_J1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_zero_J1 :: Int -> Double
+bessel_zero_J1 :: CInt -> Double
 bessel_zero_J1 = gsl_sf_bessel_zero_J1
-foreign import ccall "bessel.h gsl_sf_bessel_zero_J1" gsl_sf_bessel_zero_J1 :: Int -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_zero_J1" gsl_sf_bessel_zero_J1 :: CInt -> Double
 
 -- | wrapper for int gsl_sf_bessel_zero_Jnu_e(double nu,int s,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_zero_Jnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_zero_Jnu_e :: Double -> Int -> (Double,Double)
+bessel_zero_Jnu_e :: Double -> CInt -> (Double,Double)
 bessel_zero_Jnu_e nu s = createSFR "bessel_zero_Jnu_e" $ gsl_sf_bessel_zero_Jnu_e nu s
-foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu_e" gsl_sf_bessel_zero_Jnu_e :: Double -> Int -> Ptr Double -> IO(Int)
+foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu_e" gsl_sf_bessel_zero_Jnu_e :: Double -> CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_bessel_zero_Jnu(double nu,int s);
 --
 --   <http://www.google.com/search?q=gsl_sf_bessel_zero_Jnu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-bessel_zero_Jnu :: Double -> Int -> Double
+bessel_zero_Jnu :: Double -> CInt -> Double
 bessel_zero_Jnu = gsl_sf_bessel_zero_Jnu
-foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu" gsl_sf_bessel_zero_Jnu :: Double -> Int -> Double
+foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu" gsl_sf_bessel_zero_Jnu :: Double -> CInt -> Double
diff --git a/lib/Numeric/GSL/Special/Clausen.hs b/lib/Numeric/GSL/Special/Clausen.hs
--- a/lib/Numeric/GSL/Special/Clausen.hs
+++ b/lib/Numeric/GSL/Special/Clausen.hs
@@ -20,6 +20,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_clausen_e(double x,gsl_sf_result* result);
@@ -27,7 +28,7 @@
 --   <http://www.google.com/search?q=gsl_sf_clausen_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 clausen_e :: Double -> (Double,Double)
 clausen_e x = createSFR "clausen_e" $ gsl_sf_clausen_e x
-foreign import ccall "clausen.h gsl_sf_clausen_e" gsl_sf_clausen_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "clausen.h gsl_sf_clausen_e" gsl_sf_clausen_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_clausen(double x);
 --
diff --git a/lib/Numeric/GSL/Special/Coulomb.hs b/lib/Numeric/GSL/Special/Coulomb.hs
--- a/lib/Numeric/GSL/Special/Coulomb.hs
+++ b/lib/Numeric/GSL/Special/Coulomb.hs
@@ -23,6 +23,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_hydrogenicR_1_e(double Z,double r,gsl_sf_result* result);
@@ -30,7 +31,7 @@
 --   <http://www.google.com/search?q=gsl_sf_hydrogenicR_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hydrogenicR_1_e :: Double -> Double -> (Double,Double)
 hydrogenicR_1_e zZ r = createSFR "hydrogenicR_1_e" $ gsl_sf_hydrogenicR_1_e zZ r
-foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1_e" gsl_sf_hydrogenicR_1_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1_e" gsl_sf_hydrogenicR_1_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hydrogenicR_1(double Z,double r);
 --
@@ -42,62 +43,62 @@
 -- | wrapper for int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_hydrogenicR_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-hydrogenicR_e :: Int -> Int -> Double -> Double -> (Double,Double)
+hydrogenicR_e :: CInt -> CInt -> Double -> Double -> (Double,Double)
 hydrogenicR_e n l zZ r = createSFR "hydrogenicR_e" $ gsl_sf_hydrogenicR_e n l zZ r
-foreign import ccall "coulomb.h gsl_sf_hydrogenicR_e" gsl_sf_hydrogenicR_e :: Int -> Int -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "coulomb.h gsl_sf_hydrogenicR_e" gsl_sf_hydrogenicR_e :: CInt -> CInt -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hydrogenicR(int n,int l,double Z,double r);
 --
 --   <http://www.google.com/search?q=gsl_sf_hydrogenicR&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-hydrogenicR :: Int -> Int -> Double -> Double -> Double
+hydrogenicR :: CInt -> CInt -> Double -> Double -> Double
 hydrogenicR = gsl_sf_hydrogenicR
-foreign import ccall "coulomb.h gsl_sf_hydrogenicR" gsl_sf_hydrogenicR :: Int -> Int -> Double -> Double -> Double
+foreign import ccall "coulomb.h gsl_sf_hydrogenicR" gsl_sf_hydrogenicR :: CInt -> CInt -> Double -> Double -> Double
 
 -- | wrapper for int gsl_sf_coulomb_wave_FG_e(double eta,double x,double lam_F,int k_lam_G,gsl_sf_result* F,gsl_sf_result* Fp,gsl_sf_result* G,gsl_sf_result* Gp,double* exp_F,double* exp_G);
 --
 --   <http://www.google.com/search?q=gsl_sf_coulomb_wave_FG_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
+coulomb_wave_FG_e :: Double -> Double -> Double -> CInt -> Ptr () -> Ptr () -> Ptr () -> Ptr () -> Ptr Double -> Ptr Double -> CInt
 coulomb_wave_FG_e = gsl_sf_coulomb_wave_FG_e
-foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_e" gsl_sf_coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_e" gsl_sf_coulomb_wave_FG_e :: Double -> Double -> Double -> CInt -> Ptr () -> Ptr () -> Ptr () -> Ptr () -> Ptr Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent);
 --
 --   <http://www.google.com/search?q=gsl_sf_coulomb_wave_F_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int
+coulomb_wave_F_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> CInt
 coulomb_wave_F_array = gsl_sf_coulomb_wave_F_array
-foreign import ccall "coulomb.h gsl_sf_coulomb_wave_F_array" gsl_sf_coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "coulomb.h gsl_sf_coulomb_wave_F_array" gsl_sf_coulomb_wave_F_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_coulomb_wave_FG_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* gc_array,double* F_exponent,double* G_exponent);
 --
 --   <http://www.google.com/search?q=gsl_sf_coulomb_wave_FG_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
+coulomb_wave_FG_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> CInt
 coulomb_wave_FG_array = gsl_sf_coulomb_wave_FG_array
-foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_array" gsl_sf_coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_array" gsl_sf_coulomb_wave_FG_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_coulomb_wave_FGp_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* fcp_array,double* gc_array,double* gcp_array,double* F_exponent,double* G_exponent);
 --
 --   <http://www.google.com/search?q=gsl_sf_coulomb_wave_FGp_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
+coulomb_wave_FGp_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> CInt
 coulomb_wave_FGp_array = gsl_sf_coulomb_wave_FGp_array
-foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FGp_array" gsl_sf_coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FGp_array" gsl_sf_coulomb_wave_FGp_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent);
 --
 --   <http://www.google.com/search?q=gsl_sf_coulomb_wave_sphF_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int
+coulomb_wave_sphF_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> CInt
 coulomb_wave_sphF_array = gsl_sf_coulomb_wave_sphF_array
-foreign import ccall "coulomb.h gsl_sf_coulomb_wave_sphF_array" gsl_sf_coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "coulomb.h gsl_sf_coulomb_wave_sphF_array" gsl_sf_coulomb_wave_sphF_array :: Double -> CInt -> Double -> Double -> Ptr Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_coulomb_CL_e(double L,double eta,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_coulomb_CL_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 coulomb_CL_e :: Double -> Double -> (Double,Double)
 coulomb_CL_e lL eta = createSFR "coulomb_CL_e" $ gsl_sf_coulomb_CL_e lL eta
-foreign import ccall "coulomb.h gsl_sf_coulomb_CL_e" gsl_sf_coulomb_CL_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "coulomb.h gsl_sf_coulomb_CL_e" gsl_sf_coulomb_CL_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl);
 --
 --   <http://www.google.com/search?q=gsl_sf_coulomb_CL_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int
+coulomb_CL_array :: Double -> CInt -> Double -> Ptr Double -> CInt
 coulomb_CL_array = gsl_sf_coulomb_CL_array
-foreign import ccall "coulomb.h gsl_sf_coulomb_CL_array" gsl_sf_coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int
+foreign import ccall "coulomb.h gsl_sf_coulomb_CL_array" gsl_sf_coulomb_CL_array :: Double -> CInt -> Double -> Ptr Double -> CInt
diff --git a/lib/Numeric/GSL/Special/Coupling.hs b/lib/Numeric/GSL/Special/Coupling.hs
--- a/lib/Numeric/GSL/Special/Coupling.hs
+++ b/lib/Numeric/GSL/Special/Coupling.hs
@@ -9,7 +9,7 @@
 
 Wrappers for selected functions described at:
 
-<http://www.gnu.org/software/gsl/manual/html_node/Coupling-Coefficients.html>
+<http://www.google.com/search?q=gsl_sf_coupling.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 
 -}
 ------------------------------------------------------------
@@ -23,59 +23,78 @@
 , coupling_RacahW
 , coupling_9j_e
 , coupling_9j
--- , coupling_6j_INCORRECT_e
--- , coupling_6j_INCORRECT
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_coupling_3j_e(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc,gsl_sf_result* result);
-coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_3j_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_3j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (Double,Double)
 coupling_3j_e two_ja two_jb two_jc two_ma two_mb two_mc = createSFR "coupling_3j_e" $ gsl_sf_coupling_3j_e two_ja two_jb two_jc two_ma two_mb two_mc
-foreign import ccall "coupling.h gsl_sf_coupling_3j_e" gsl_sf_coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
+foreign import ccall "coupling.h gsl_sf_coupling_3j_e" gsl_sf_coupling_3j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_coupling_3j(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc);
-coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_3j&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_3j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
 coupling_3j = gsl_sf_coupling_3j
-foreign import ccall "coupling.h gsl_sf_coupling_3j" gsl_sf_coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double
+foreign import ccall "coupling.h gsl_sf_coupling_3j" gsl_sf_coupling_3j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
 
 -- | wrapper for int gsl_sf_coupling_6j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result);
-coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_6j_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_6j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (Double,Double)
 coupling_6j_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_6j_e" $ gsl_sf_coupling_6j_e two_ja two_jb two_jc two_jd two_je two_jf
-foreign import ccall "coupling.h gsl_sf_coupling_6j_e" gsl_sf_coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
+foreign import ccall "coupling.h gsl_sf_coupling_6j_e" gsl_sf_coupling_6j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_coupling_6j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf);
-coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_6j&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_6j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
 coupling_6j = gsl_sf_coupling_6j
-foreign import ccall "coupling.h gsl_sf_coupling_6j" gsl_sf_coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double
+foreign import ccall "coupling.h gsl_sf_coupling_6j" gsl_sf_coupling_6j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
 
 -- | wrapper for int gsl_sf_coupling_RacahW_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result);
-coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_RacahW_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_RacahW_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (Double,Double)
 coupling_RacahW_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_RacahW_e" $ gsl_sf_coupling_RacahW_e two_ja two_jb two_jc two_jd two_je two_jf
-foreign import ccall "coupling.h gsl_sf_coupling_RacahW_e" gsl_sf_coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
+foreign import ccall "coupling.h gsl_sf_coupling_RacahW_e" gsl_sf_coupling_RacahW_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_coupling_RacahW(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf);
-coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_RacahW&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_RacahW :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
 coupling_RacahW = gsl_sf_coupling_RacahW
-foreign import ccall "coupling.h gsl_sf_coupling_RacahW" gsl_sf_coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double
+foreign import ccall "coupling.h gsl_sf_coupling_RacahW" gsl_sf_coupling_RacahW :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
 
 -- | wrapper for int gsl_sf_coupling_9j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji,gsl_sf_result* result);
-coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_9j_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_9j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (Double,Double)
 coupling_9j_e two_ja two_jb two_jc two_jd two_je two_jf two_jg two_jh two_ji = createSFR "coupling_9j_e" $ gsl_sf_coupling_9j_e two_ja two_jb two_jc two_jd two_je two_jf two_jg two_jh two_ji
-foreign import ccall "coupling.h gsl_sf_coupling_9j_e" gsl_sf_coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
+foreign import ccall "coupling.h gsl_sf_coupling_9j_e" gsl_sf_coupling_9j_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_coupling_9j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji);
-coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_9j&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_9j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
 coupling_9j = gsl_sf_coupling_9j
-foreign import ccall "coupling.h gsl_sf_coupling_9j" gsl_sf_coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double
+foreign import ccall "coupling.h gsl_sf_coupling_9j" gsl_sf_coupling_9j :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
 
 -- | wrapper for int gsl_sf_coupling_6j_INCORRECT_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result);
-coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_6j_INCORRECT_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_6j_INCORRECT_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> (Double,Double)
 coupling_6j_INCORRECT_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_6j_INCORRECT_e" $ gsl_sf_coupling_6j_INCORRECT_e two_ja two_jb two_jc two_jd two_je two_jf
-foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT_e" gsl_sf_coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
+foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT_e" gsl_sf_coupling_6j_INCORRECT_e :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_coupling_6j_INCORRECT(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf);
-coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_coupling_6j_INCORRECT&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+coupling_6j_INCORRECT :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
 coupling_6j_INCORRECT = gsl_sf_coupling_6j_INCORRECT
-foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT" gsl_sf_coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double
+foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT" gsl_sf_coupling_6j_INCORRECT :: CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Double
diff --git a/lib/Numeric/GSL/Special/Dawson.hs b/lib/Numeric/GSL/Special/Dawson.hs
--- a/lib/Numeric/GSL/Special/Dawson.hs
+++ b/lib/Numeric/GSL/Special/Dawson.hs
@@ -20,6 +20,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_dawson_e(double x,gsl_sf_result* result);
@@ -27,7 +28,7 @@
 --   <http://www.google.com/search?q=gsl_sf_dawson_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 dawson_e :: Double -> (Double,Double)
 dawson_e x = createSFR "dawson_e" $ gsl_sf_dawson_e x
-foreign import ccall "dawson.h gsl_sf_dawson_e" gsl_sf_dawson_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "dawson.h gsl_sf_dawson_e" gsl_sf_dawson_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_dawson(double x);
 --
diff --git a/lib/Numeric/GSL/Special/Debye.hs b/lib/Numeric/GSL/Special/Debye.hs
--- a/lib/Numeric/GSL/Special/Debye.hs
+++ b/lib/Numeric/GSL/Special/Debye.hs
@@ -23,9 +23,14 @@
 , debye_3
 , debye_4_e
 , debye_4
+--, debye_5_e
+--, debye_5
+--, debye_6_e
+--, debye_6
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_debye_1_e(double x,gsl_sf_result* result);
@@ -33,7 +38,7 @@
 --   <http://www.google.com/search?q=gsl_sf_debye_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 debye_1_e :: Double -> (Double,Double)
 debye_1_e x = createSFR "debye_1_e" $ gsl_sf_debye_1_e x
-foreign import ccall "debye.h gsl_sf_debye_1_e" gsl_sf_debye_1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "debye.h gsl_sf_debye_1_e" gsl_sf_debye_1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_debye_1(double x);
 --
@@ -47,7 +52,7 @@
 --   <http://www.google.com/search?q=gsl_sf_debye_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 debye_2_e :: Double -> (Double,Double)
 debye_2_e x = createSFR "debye_2_e" $ gsl_sf_debye_2_e x
-foreign import ccall "debye.h gsl_sf_debye_2_e" gsl_sf_debye_2_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "debye.h gsl_sf_debye_2_e" gsl_sf_debye_2_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_debye_2(double x);
 --
@@ -61,7 +66,7 @@
 --   <http://www.google.com/search?q=gsl_sf_debye_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 debye_3_e :: Double -> (Double,Double)
 debye_3_e x = createSFR "debye_3_e" $ gsl_sf_debye_3_e x
-foreign import ccall "debye.h gsl_sf_debye_3_e" gsl_sf_debye_3_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "debye.h gsl_sf_debye_3_e" gsl_sf_debye_3_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_debye_3(double x);
 --
@@ -75,7 +80,7 @@
 --   <http://www.google.com/search?q=gsl_sf_debye_4_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 debye_4_e :: Double -> (Double,Double)
 debye_4_e x = createSFR "debye_4_e" $ gsl_sf_debye_4_e x
-foreign import ccall "debye.h gsl_sf_debye_4_e" gsl_sf_debye_4_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "debye.h gsl_sf_debye_4_e" gsl_sf_debye_4_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_debye_4(double x);
 --
@@ -83,3 +88,31 @@
 debye_4 :: Double -> Double
 debye_4 = gsl_sf_debye_4
 foreign import ccall "debye.h gsl_sf_debye_4" gsl_sf_debye_4 :: Double -> Double
+
+-- | wrapper for int gsl_sf_debye_5_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_debye_5_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+--debye_5_e :: Double -> (Double,Double)
+--debye_5_e x = createSFR "debye_5_e" $ gsl_sf_debye_5_e x
+--foreign import ccall "debye.h gsl_sf_debye_5_e" gsl_sf_debye_5_e :: Double -> Ptr () -> IO CInt
+
+-- | wrapper for double gsl_sf_debye_5(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_debye_5&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+--debye_5 :: Double -> Double
+--debye_5 = gsl_sf_debye_5
+--foreign import ccall "debye.h gsl_sf_debye_5" gsl_sf_debye_5 :: Double -> Double
+
+-- | wrapper for int gsl_sf_debye_6_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_debye_6_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+--debye_6_e :: Double -> (Double,Double)
+--debye_6_e x = createSFR "debye_6_e" $ gsl_sf_debye_6_e x
+--foreign import ccall "debye.h gsl_sf_debye_6_e" gsl_sf_debye_6_e :: Double -> Ptr () -> IO CInt
+
+-- | wrapper for double gsl_sf_debye_6(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_debye_6&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+--debye_6 :: Double -> Double
+--debye_6 = gsl_sf_debye_6
+--foreign import ccall "debye.h gsl_sf_debye_6" gsl_sf_debye_6 :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Dilog.hs b/lib/Numeric/GSL/Special/Dilog.hs
--- a/lib/Numeric/GSL/Special/Dilog.hs
+++ b/lib/Numeric/GSL/Special/Dilog.hs
@@ -20,6 +20,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_dilog_e(double x,gsl_sf_result* result);
@@ -27,7 +28,7 @@
 --   <http://www.google.com/search?q=gsl_sf_dilog_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 dilog_e :: Double -> (Double,Double)
 dilog_e x = createSFR "dilog_e" $ gsl_sf_dilog_e x
-foreign import ccall "dilog.h gsl_sf_dilog_e" gsl_sf_dilog_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "dilog.h gsl_sf_dilog_e" gsl_sf_dilog_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_dilog(double x);
 --
@@ -39,20 +40,20 @@
 -- | wrapper for int gsl_sf_complex_dilog_xy_e(double x,double y,gsl_sf_result* result_re,gsl_sf_result* result_im);
 --
 --   <http://www.google.com/search?q=gsl_sf_complex_dilog_xy_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-complex_dilog_xy_e :: Double -> Double -> Ptr Double -> (Double,Double)
+complex_dilog_xy_e :: Double -> Double -> Ptr () -> (Double,Double)
 complex_dilog_xy_e x y result_re = createSFR "complex_dilog_xy_e" $ gsl_sf_complex_dilog_xy_e x y result_re
-foreign import ccall "dilog.h gsl_sf_complex_dilog_xy_e" gsl_sf_complex_dilog_xy_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "dilog.h gsl_sf_complex_dilog_xy_e" gsl_sf_complex_dilog_xy_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_complex_dilog_e(double r,double theta,gsl_sf_result* result_re,gsl_sf_result* result_im);
 --
 --   <http://www.google.com/search?q=gsl_sf_complex_dilog_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-complex_dilog_e :: Double -> Double -> Ptr Double -> (Double,Double)
+complex_dilog_e :: Double -> Double -> Ptr () -> (Double,Double)
 complex_dilog_e r theta result_re = createSFR "complex_dilog_e" $ gsl_sf_complex_dilog_e r theta result_re
-foreign import ccall "dilog.h gsl_sf_complex_dilog_e" gsl_sf_complex_dilog_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "dilog.h gsl_sf_complex_dilog_e" gsl_sf_complex_dilog_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_complex_spence_xy_e(double x,double y,gsl_sf_result* real_sp,gsl_sf_result* imag_sp);
 --
 --   <http://www.google.com/search?q=gsl_sf_complex_spence_xy_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-complex_spence_xy_e :: Double -> Double -> Ptr Double -> (Double,Double)
+complex_spence_xy_e :: Double -> Double -> Ptr () -> (Double,Double)
 complex_spence_xy_e x y real_sp = createSFR "complex_spence_xy_e" $ gsl_sf_complex_spence_xy_e x y real_sp
-foreign import ccall "dilog.h gsl_sf_complex_spence_xy_e" gsl_sf_complex_spence_xy_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "dilog.h gsl_sf_complex_spence_xy_e" gsl_sf_complex_spence_xy_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
diff --git a/lib/Numeric/GSL/Special/Elementary.hs b/lib/Numeric/GSL/Special/Elementary.hs
--- a/lib/Numeric/GSL/Special/Elementary.hs
+++ b/lib/Numeric/GSL/Special/Elementary.hs
@@ -21,6 +21,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_multiply_e(double x,double y,gsl_sf_result* result);
@@ -28,7 +29,7 @@
 --   <http://www.google.com/search?q=gsl_sf_multiply_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 multiply_e :: Double -> Double -> (Double,Double)
 multiply_e x y = createSFR "multiply_e" $ gsl_sf_multiply_e x y
-foreign import ccall "elementary.h gsl_sf_multiply_e" gsl_sf_multiply_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "elementary.h gsl_sf_multiply_e" gsl_sf_multiply_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_multiply(double x,double y);
 --
@@ -42,4 +43,4 @@
 --   <http://www.google.com/search?q=gsl_sf_multiply_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 multiply_err_e :: Double -> Double -> Double -> Double -> (Double,Double)
 multiply_err_e x dx y dy = createSFR "multiply_err_e" $ gsl_sf_multiply_err_e x dx y dy
-foreign import ccall "elementary.h gsl_sf_multiply_err_e" gsl_sf_multiply_err_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "elementary.h gsl_sf_multiply_err_e" gsl_sf_multiply_err_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt
diff --git a/lib/Numeric/GSL/Special/Ellint.hs b/lib/Numeric/GSL/Special/Ellint.hs
--- a/lib/Numeric/GSL/Special/Ellint.hs
+++ b/lib/Numeric/GSL/Special/Ellint.hs
@@ -19,6 +19,10 @@
 , ellint_Kcomp
 , ellint_Ecomp_e
 , ellint_Ecomp
+--, ellint_Pcomp_e
+--, ellint_Pcomp
+--, ellint_Dcomp_e
+--, ellint_Dcomp
 , ellint_F_e
 , ellint_F
 , ellint_E_e
@@ -38,6 +42,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_ellint_Kcomp_e(double k,gsl_mode_t mode,gsl_sf_result* result);
@@ -45,7 +50,7 @@
 --   <http://www.google.com/search?q=gsl_sf_ellint_Kcomp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_Kcomp_e :: Double -> Precision -> (Double,Double)
 ellint_Kcomp_e k mode = createSFR "ellint_Kcomp_e" $ gsl_sf_ellint_Kcomp_e k  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_Kcomp_e" gsl_sf_ellint_Kcomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_Kcomp_e" gsl_sf_ellint_Kcomp_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_Kcomp(double k,gsl_mode_t mode);
 --
@@ -59,7 +64,7 @@
 --   <http://www.google.com/search?q=gsl_sf_ellint_Ecomp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_Ecomp_e :: Double -> Precision -> (Double,Double)
 ellint_Ecomp_e k mode = createSFR "ellint_Ecomp_e" $ gsl_sf_ellint_Ecomp_e k  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_Ecomp_e" gsl_sf_ellint_Ecomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_Ecomp_e" gsl_sf_ellint_Ecomp_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_Ecomp(double k,gsl_mode_t mode);
 --
@@ -68,12 +73,40 @@
 ellint_Ecomp k mode = gsl_sf_ellint_Ecomp k  (precCode mode)
 foreign import ccall "ellint.h gsl_sf_ellint_Ecomp" gsl_sf_ellint_Ecomp :: Double -> Gsl_mode_t -> Double
 
+-- | wrapper for int gsl_sf_ellint_Pcomp_e(double k,double n,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_ellint_Pcomp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+--ellint_Pcomp_e :: Double -> Double -> Precision -> (Double,Double)
+--ellint_Pcomp_e k n mode = createSFR "ellint_Pcomp_e" $ gsl_sf_ellint_Pcomp_e k n  (precCode mode)
+--foreign import ccall "ellint.h gsl_sf_ellint_Pcomp_e" gsl_sf_ellint_Pcomp_e :: Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt
+
+-- | wrapper for double gsl_sf_ellint_Pcomp(double k,double n,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_ellint_Pcomp&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+--ellint_Pcomp :: Double -> Double -> Precision -> Double
+--ellint_Pcomp k n mode = gsl_sf_ellint_Pcomp k n  (precCode mode)
+--foreign import ccall "ellint.h gsl_sf_ellint_Pcomp" gsl_sf_ellint_Pcomp :: Double -> Double -> Gsl_mode_t -> Double
+
+-- | wrapper for int gsl_sf_ellint_Dcomp_e(double k,gsl_mode_t mode,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_ellint_Dcomp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+--ellint_Dcomp_e :: Double -> Precision -> (Double,Double)
+--ellint_Dcomp_e k mode = createSFR "ellint_Dcomp_e" $ gsl_sf_ellint_Dcomp_e k  (precCode mode)
+--foreign import ccall "ellint.h gsl_sf_ellint_Dcomp_e" gsl_sf_ellint_Dcomp_e :: Double -> Gsl_mode_t -> Ptr () -> IO CInt
+
+-- | wrapper for double gsl_sf_ellint_Dcomp(double k,gsl_mode_t mode);
+--
+--   <http://www.google.com/search?q=gsl_sf_ellint_Dcomp&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+--ellint_Dcomp :: Double -> Precision -> Double
+--ellint_Dcomp k mode = gsl_sf_ellint_Dcomp k  (precCode mode)
+--foreign import ccall "ellint.h gsl_sf_ellint_Dcomp" gsl_sf_ellint_Dcomp :: Double -> Gsl_mode_t -> Double
+
 -- | wrapper for int gsl_sf_ellint_F_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_ellint_F_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_F_e :: Double -> Double -> Precision -> (Double,Double)
 ellint_F_e phi k mode = createSFR "ellint_F_e" $ gsl_sf_ellint_F_e phi k  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_F_e" gsl_sf_ellint_F_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_F_e" gsl_sf_ellint_F_e :: Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_F(double phi,double k,gsl_mode_t mode);
 --
@@ -87,7 +120,7 @@
 --   <http://www.google.com/search?q=gsl_sf_ellint_E_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_E_e :: Double -> Double -> Precision -> (Double,Double)
 ellint_E_e phi k mode = createSFR "ellint_E_e" $ gsl_sf_ellint_E_e phi k  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_E_e" gsl_sf_ellint_E_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_E_e" gsl_sf_ellint_E_e :: Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_E(double phi,double k,gsl_mode_t mode);
 --
@@ -101,7 +134,7 @@
 --   <http://www.google.com/search?q=gsl_sf_ellint_P_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_P_e :: Double -> Double -> Double -> Precision -> (Double,Double)
 ellint_P_e phi k n mode = createSFR "ellint_P_e" $ gsl_sf_ellint_P_e phi k n  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_P_e" gsl_sf_ellint_P_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_P_e" gsl_sf_ellint_P_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_P(double phi,double k,double n,gsl_mode_t mode);
 --
@@ -115,7 +148,7 @@
 --   <http://www.google.com/search?q=gsl_sf_ellint_D_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_D_e :: Double -> Double -> Double -> Precision -> (Double,Double)
 ellint_D_e phi k n mode = createSFR "ellint_D_e" $ gsl_sf_ellint_D_e phi k n  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_D_e" gsl_sf_ellint_D_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_D_e" gsl_sf_ellint_D_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_D(double phi,double k,double n,gsl_mode_t mode);
 --
@@ -129,7 +162,7 @@
 --   <http://www.google.com/search?q=gsl_sf_ellint_RC_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_RC_e :: Double -> Double -> Precision -> (Double,Double)
 ellint_RC_e x y mode = createSFR "ellint_RC_e" $ gsl_sf_ellint_RC_e x y  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_RC_e" gsl_sf_ellint_RC_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_RC_e" gsl_sf_ellint_RC_e :: Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_RC(double x,double y,gsl_mode_t mode);
 --
@@ -143,7 +176,7 @@
 --   <http://www.google.com/search?q=gsl_sf_ellint_RD_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_RD_e :: Double -> Double -> Double -> Precision -> (Double,Double)
 ellint_RD_e x y z mode = createSFR "ellint_RD_e" $ gsl_sf_ellint_RD_e x y z  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_RD_e" gsl_sf_ellint_RD_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_RD_e" gsl_sf_ellint_RD_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_RD(double x,double y,double z,gsl_mode_t mode);
 --
@@ -157,7 +190,7 @@
 --   <http://www.google.com/search?q=gsl_sf_ellint_RF_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_RF_e :: Double -> Double -> Double -> Precision -> (Double,Double)
 ellint_RF_e x y z mode = createSFR "ellint_RF_e" $ gsl_sf_ellint_RF_e x y z  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_RF_e" gsl_sf_ellint_RF_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_RF_e" gsl_sf_ellint_RF_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_RF(double x,double y,double z,gsl_mode_t mode);
 --
@@ -171,7 +204,7 @@
 --   <http://www.google.com/search?q=gsl_sf_ellint_RJ_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ellint_RJ_e :: Double -> Double -> Double -> Double -> Precision -> (Double,Double)
 ellint_RJ_e x y z p mode = createSFR "ellint_RJ_e" $ gsl_sf_ellint_RJ_e x y z p  (precCode mode)
-foreign import ccall "ellint.h gsl_sf_ellint_RJ_e" gsl_sf_ellint_RJ_e :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
+foreign import ccall "ellint.h gsl_sf_ellint_RJ_e" gsl_sf_ellint_RJ_e :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_ellint_RJ(double x,double y,double z,double p,gsl_mode_t mode);
 --
diff --git a/lib/Numeric/GSL/Special/Erf.hs b/lib/Numeric/GSL/Special/Erf.hs
--- a/lib/Numeric/GSL/Special/Erf.hs
+++ b/lib/Numeric/GSL/Special/Erf.hs
@@ -30,6 +30,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_erfc_e(double x,gsl_sf_result* result);
@@ -37,7 +38,7 @@
 --   <http://www.google.com/search?q=gsl_sf_erfc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 erfc_e :: Double -> (Double,Double)
 erfc_e x = createSFR "erfc_e" $ gsl_sf_erfc_e x
-foreign import ccall "erf.h gsl_sf_erfc_e" gsl_sf_erfc_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "erf.h gsl_sf_erfc_e" gsl_sf_erfc_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_erfc(double x);
 --
@@ -51,7 +52,7 @@
 --   <http://www.google.com/search?q=gsl_sf_log_erfc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 log_erfc_e :: Double -> (Double,Double)
 log_erfc_e x = createSFR "log_erfc_e" $ gsl_sf_log_erfc_e x
-foreign import ccall "erf.h gsl_sf_log_erfc_e" gsl_sf_log_erfc_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "erf.h gsl_sf_log_erfc_e" gsl_sf_log_erfc_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_log_erfc(double x);
 --
@@ -65,7 +66,7 @@
 --   <http://www.google.com/search?q=gsl_sf_erf_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 erf_e :: Double -> (Double,Double)
 erf_e x = createSFR "erf_e" $ gsl_sf_erf_e x
-foreign import ccall "erf.h gsl_sf_erf_e" gsl_sf_erf_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "erf.h gsl_sf_erf_e" gsl_sf_erf_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_erf(double x);
 --
@@ -79,14 +80,14 @@
 --   <http://www.google.com/search?q=gsl_sf_erf_Z_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 erf_Z_e :: Double -> (Double,Double)
 erf_Z_e x = createSFR "erf_Z_e" $ gsl_sf_erf_Z_e x
-foreign import ccall "erf.h gsl_sf_erf_Z_e" gsl_sf_erf_Z_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "erf.h gsl_sf_erf_Z_e" gsl_sf_erf_Z_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_erf_Q_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_erf_Q_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 erf_Q_e :: Double -> (Double,Double)
 erf_Q_e x = createSFR "erf_Q_e" $ gsl_sf_erf_Q_e x
-foreign import ccall "erf.h gsl_sf_erf_Q_e" gsl_sf_erf_Q_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "erf.h gsl_sf_erf_Q_e" gsl_sf_erf_Q_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_erf_Z(double x);
 --
@@ -107,7 +108,7 @@
 --   <http://www.google.com/search?q=gsl_sf_hazard_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hazard_e :: Double -> (Double,Double)
 hazard_e x = createSFR "hazard_e" $ gsl_sf_hazard_e x
-foreign import ccall "erf.h gsl_sf_hazard_e" gsl_sf_hazard_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "erf.h gsl_sf_hazard_e" gsl_sf_hazard_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hazard(double x);
 --
diff --git a/lib/Numeric/GSL/Special/Exp.hs b/lib/Numeric/GSL/Special/Exp.hs
--- a/lib/Numeric/GSL/Special/Exp.hs
+++ b/lib/Numeric/GSL/Special/Exp.hs
@@ -9,7 +9,7 @@
 
 Wrappers for selected functions described at:
 
-<http://www.gnu.org/software/gsl/manual/html_node/Exponential-Functions.html>
+<http://www.google.com/search?q=gsl_sf_exp.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 
 -}
 ------------------------------------------------------------
@@ -36,94 +36,131 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_exp_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp_e :: Double -> (Double,Double)
 exp_e x = createSFR "exp_e" $ gsl_sf_exp_e x
-foreign import ccall "exp.h gsl_sf_exp_e" gsl_sf_exp_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exp_e" gsl_sf_exp_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_exp(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp :: Double -> Double
 exp = gsl_sf_exp
 foreign import ccall "exp.h gsl_sf_exp" gsl_sf_exp :: Double -> Double
 
 -- | wrapper for int gsl_sf_exp_e10_e(double x,gsl_sf_result_e10* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp_e10_e :: Double -> (Double,Int,Double)
 exp_e10_e x = createSFR_E10 "exp_e10_e" $ gsl_sf_exp_e10_e x
-foreign import ccall "exp.h gsl_sf_exp_e10_e" gsl_sf_exp_e10_e :: Double -> Ptr () -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exp_e10_e" gsl_sf_exp_e10_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_exp_mult_e(double x,double y,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp_mult_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp_mult_e :: Double -> Double -> (Double,Double)
 exp_mult_e x y = createSFR "exp_mult_e" $ gsl_sf_exp_mult_e x y
-foreign import ccall "exp.h gsl_sf_exp_mult_e" gsl_sf_exp_mult_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exp_mult_e" gsl_sf_exp_mult_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_exp_mult(double x,double y);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp_mult&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp_mult :: Double -> Double -> Double
 exp_mult = gsl_sf_exp_mult
 foreign import ccall "exp.h gsl_sf_exp_mult" gsl_sf_exp_mult :: Double -> Double -> Double
 
 -- | wrapper for int gsl_sf_exp_mult_e10_e(double x,double y,gsl_sf_result_e10* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp_mult_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp_mult_e10_e :: Double -> Double -> (Double,Int,Double)
 exp_mult_e10_e x y = createSFR_E10 "exp_mult_e10_e" $ gsl_sf_exp_mult_e10_e x y
-foreign import ccall "exp.h gsl_sf_exp_mult_e10_e" gsl_sf_exp_mult_e10_e :: Double -> Double -> Ptr () -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exp_mult_e10_e" gsl_sf_exp_mult_e10_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_expm1_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_expm1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 expm1_e :: Double -> (Double,Double)
 expm1_e x = createSFR "expm1_e" $ gsl_sf_expm1_e x
-foreign import ccall "exp.h gsl_sf_expm1_e" gsl_sf_expm1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "exp.h gsl_sf_expm1_e" gsl_sf_expm1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_expm1(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_expm1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 expm1 :: Double -> Double
 expm1 = gsl_sf_expm1
 foreign import ccall "exp.h gsl_sf_expm1" gsl_sf_expm1 :: Double -> Double
 
 -- | wrapper for int gsl_sf_exprel_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exprel_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exprel_e :: Double -> (Double,Double)
 exprel_e x = createSFR "exprel_e" $ gsl_sf_exprel_e x
-foreign import ccall "exp.h gsl_sf_exprel_e" gsl_sf_exprel_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exprel_e" gsl_sf_exprel_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_exprel(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_exprel&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exprel :: Double -> Double
 exprel = gsl_sf_exprel
 foreign import ccall "exp.h gsl_sf_exprel" gsl_sf_exprel :: Double -> Double
 
 -- | wrapper for int gsl_sf_exprel_2_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exprel_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exprel_2_e :: Double -> (Double,Double)
 exprel_2_e x = createSFR "exprel_2_e" $ gsl_sf_exprel_2_e x
-foreign import ccall "exp.h gsl_sf_exprel_2_e" gsl_sf_exprel_2_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exprel_2_e" gsl_sf_exprel_2_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_exprel_2(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_exprel_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exprel_2 :: Double -> Double
 exprel_2 = gsl_sf_exprel_2
 foreign import ccall "exp.h gsl_sf_exprel_2" gsl_sf_exprel_2 :: Double -> Double
 
 -- | wrapper for int gsl_sf_exprel_n_e(int n,double x,gsl_sf_result* result);
-exprel_n_e :: Int -> Double -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_exprel_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+exprel_n_e :: CInt -> Double -> (Double,Double)
 exprel_n_e n x = createSFR "exprel_n_e" $ gsl_sf_exprel_n_e n x
-foreign import ccall "exp.h gsl_sf_exprel_n_e" gsl_sf_exprel_n_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exprel_n_e" gsl_sf_exprel_n_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_exprel_n(int n,double x);
-exprel_n :: Int -> Double -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_exprel_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+exprel_n :: CInt -> Double -> Double
 exprel_n = gsl_sf_exprel_n
-foreign import ccall "exp.h gsl_sf_exprel_n" gsl_sf_exprel_n :: Int -> Double -> Double
+foreign import ccall "exp.h gsl_sf_exprel_n" gsl_sf_exprel_n :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_exp_err_e(double x,double dx,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp_err_e :: Double -> Double -> (Double,Double)
 exp_err_e x dx = createSFR "exp_err_e" $ gsl_sf_exp_err_e x dx
-foreign import ccall "exp.h gsl_sf_exp_err_e" gsl_sf_exp_err_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exp_err_e" gsl_sf_exp_err_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_exp_err_e10_e(double x,double dx,gsl_sf_result_e10* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp_err_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp_err_e10_e :: Double -> Double -> (Double,Int,Double)
 exp_err_e10_e x dx = createSFR_E10 "exp_err_e10_e" $ gsl_sf_exp_err_e10_e x dx
-foreign import ccall "exp.h gsl_sf_exp_err_e10_e" gsl_sf_exp_err_e10_e :: Double -> Double -> Ptr () -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exp_err_e10_e" gsl_sf_exp_err_e10_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp_mult_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp_mult_err_e :: Double -> Double -> Double -> Double -> (Double,Double)
 exp_mult_err_e x dx y dy = createSFR "exp_mult_err_e" $ gsl_sf_exp_mult_err_e x dx y dy
-foreign import ccall "exp.h gsl_sf_exp_mult_err_e" gsl_sf_exp_mult_err_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exp_mult_err_e" gsl_sf_exp_mult_err_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,gsl_sf_result_e10* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_exp_mult_err_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> (Double,Int,Double)
 exp_mult_err_e10_e x dx y dy = createSFR_E10 "exp_mult_err_e10_e" $ gsl_sf_exp_mult_err_e10_e x dx y dy
-foreign import ccall "exp.h gsl_sf_exp_mult_err_e10_e" gsl_sf_exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> Ptr () -> IO(Int)
+foreign import ccall "exp.h gsl_sf_exp_mult_err_e10_e" gsl_sf_exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt
diff --git a/lib/Numeric/GSL/Special/Expint.hs b/lib/Numeric/GSL/Special/Expint.hs
--- a/lib/Numeric/GSL/Special/Expint.hs
+++ b/lib/Numeric/GSL/Special/Expint.hs
@@ -42,6 +42,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_expint_E1_e(double x,gsl_sf_result* result);
@@ -49,7 +50,7 @@
 --   <http://www.google.com/search?q=gsl_sf_expint_E1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 expint_E1_e :: Double -> (Double,Double)
 expint_E1_e x = createSFR "expint_E1_e" $ gsl_sf_expint_E1_e x
-foreign import ccall "expint.h gsl_sf_expint_E1_e" gsl_sf_expint_E1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_expint_E1_e" gsl_sf_expint_E1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_expint_E1(double x);
 --
@@ -63,7 +64,7 @@
 --   <http://www.google.com/search?q=gsl_sf_expint_E2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 expint_E2_e :: Double -> (Double,Double)
 expint_E2_e x = createSFR "expint_E2_e" $ gsl_sf_expint_E2_e x
-foreign import ccall "expint.h gsl_sf_expint_E2_e" gsl_sf_expint_E2_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_expint_E2_e" gsl_sf_expint_E2_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_expint_E2(double x);
 --
@@ -77,7 +78,7 @@
 --   <http://www.google.com/search?q=gsl_sf_expint_E1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 expint_E1_scaled_e :: Double -> (Double,Double)
 expint_E1_scaled_e x = createSFR "expint_E1_scaled_e" $ gsl_sf_expint_E1_scaled_e x
-foreign import ccall "expint.h gsl_sf_expint_E1_scaled_e" gsl_sf_expint_E1_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_expint_E1_scaled_e" gsl_sf_expint_E1_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_expint_E1_scaled(double x);
 --
@@ -91,7 +92,7 @@
 --   <http://www.google.com/search?q=gsl_sf_expint_E2_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 expint_E2_scaled_e :: Double -> (Double,Double)
 expint_E2_scaled_e x = createSFR "expint_E2_scaled_e" $ gsl_sf_expint_E2_scaled_e x
-foreign import ccall "expint.h gsl_sf_expint_E2_scaled_e" gsl_sf_expint_E2_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_expint_E2_scaled_e" gsl_sf_expint_E2_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_expint_E2_scaled(double x);
 --
@@ -105,7 +106,7 @@
 --   <http://www.google.com/search?q=gsl_sf_expint_Ei_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 expint_Ei_e :: Double -> (Double,Double)
 expint_Ei_e x = createSFR "expint_Ei_e" $ gsl_sf_expint_Ei_e x
-foreign import ccall "expint.h gsl_sf_expint_Ei_e" gsl_sf_expint_Ei_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_expint_Ei_e" gsl_sf_expint_Ei_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_expint_Ei(double x);
 --
@@ -119,7 +120,7 @@
 --   <http://www.google.com/search?q=gsl_sf_expint_Ei_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 expint_Ei_scaled_e :: Double -> (Double,Double)
 expint_Ei_scaled_e x = createSFR "expint_Ei_scaled_e" $ gsl_sf_expint_Ei_scaled_e x
-foreign import ccall "expint.h gsl_sf_expint_Ei_scaled_e" gsl_sf_expint_Ei_scaled_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_expint_Ei_scaled_e" gsl_sf_expint_Ei_scaled_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_expint_Ei_scaled(double x);
 --
@@ -133,7 +134,7 @@
 --   <http://www.google.com/search?q=gsl_sf_Shi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 shi_e :: Double -> (Double,Double)
 shi_e x = createSFR "shi_e" $ gsl_sf_Shi_e x
-foreign import ccall "expint.h gsl_sf_Shi_e" gsl_sf_Shi_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_Shi_e" gsl_sf_Shi_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_Shi(double x);
 --
@@ -147,7 +148,7 @@
 --   <http://www.google.com/search?q=gsl_sf_Chi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 chi_e :: Double -> (Double,Double)
 chi_e x = createSFR "chi_e" $ gsl_sf_Chi_e x
-foreign import ccall "expint.h gsl_sf_Chi_e" gsl_sf_Chi_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_Chi_e" gsl_sf_Chi_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_Chi(double x);
 --
@@ -161,7 +162,7 @@
 --   <http://www.google.com/search?q=gsl_sf_expint_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 expint_3_e :: Double -> (Double,Double)
 expint_3_e x = createSFR "expint_3_e" $ gsl_sf_expint_3_e x
-foreign import ccall "expint.h gsl_sf_expint_3_e" gsl_sf_expint_3_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_expint_3_e" gsl_sf_expint_3_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_expint_3(double x);
 --
@@ -175,7 +176,7 @@
 --   <http://www.google.com/search?q=gsl_sf_Si_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 si_e :: Double -> (Double,Double)
 si_e x = createSFR "si_e" $ gsl_sf_Si_e x
-foreign import ccall "expint.h gsl_sf_Si_e" gsl_sf_Si_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_Si_e" gsl_sf_Si_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_Si(double x);
 --
@@ -189,7 +190,7 @@
 --   <http://www.google.com/search?q=gsl_sf_Ci_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 ci_e :: Double -> (Double,Double)
 ci_e x = createSFR "ci_e" $ gsl_sf_Ci_e x
-foreign import ccall "expint.h gsl_sf_Ci_e" gsl_sf_Ci_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_Ci_e" gsl_sf_Ci_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_Ci(double x);
 --
@@ -203,7 +204,7 @@
 --   <http://www.google.com/search?q=gsl_sf_atanint_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 atanint_e :: Double -> (Double,Double)
 atanint_e x = createSFR "atanint_e" $ gsl_sf_atanint_e x
-foreign import ccall "expint.h gsl_sf_atanint_e" gsl_sf_atanint_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "expint.h gsl_sf_atanint_e" gsl_sf_atanint_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_atanint(double x);
 --
diff --git a/lib/Numeric/GSL/Special/Fermi_dirac.hs b/lib/Numeric/GSL/Special/Fermi_dirac.hs
--- a/lib/Numeric/GSL/Special/Fermi_dirac.hs
+++ b/lib/Numeric/GSL/Special/Fermi_dirac.hs
@@ -36,6 +36,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_fermi_dirac_m1_e(double x,gsl_sf_result* result);
@@ -43,7 +44,7 @@
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_m1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 fermi_dirac_m1_e :: Double -> (Double,Double)
 fermi_dirac_m1_e x = createSFR "fermi_dirac_m1_e" $ gsl_sf_fermi_dirac_m1_e x
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1_e" gsl_sf_fermi_dirac_m1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1_e" gsl_sf_fermi_dirac_m1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fermi_dirac_m1(double x);
 --
@@ -57,7 +58,7 @@
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 fermi_dirac_0_e :: Double -> (Double,Double)
 fermi_dirac_0_e x = createSFR "fermi_dirac_0_e" $ gsl_sf_fermi_dirac_0_e x
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0_e" gsl_sf_fermi_dirac_0_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0_e" gsl_sf_fermi_dirac_0_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fermi_dirac_0(double x);
 --
@@ -71,7 +72,7 @@
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 fermi_dirac_1_e :: Double -> (Double,Double)
 fermi_dirac_1_e x = createSFR "fermi_dirac_1_e" $ gsl_sf_fermi_dirac_1_e x
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1_e" gsl_sf_fermi_dirac_1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1_e" gsl_sf_fermi_dirac_1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fermi_dirac_1(double x);
 --
@@ -85,7 +86,7 @@
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 fermi_dirac_2_e :: Double -> (Double,Double)
 fermi_dirac_2_e x = createSFR "fermi_dirac_2_e" $ gsl_sf_fermi_dirac_2_e x
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2_e" gsl_sf_fermi_dirac_2_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2_e" gsl_sf_fermi_dirac_2_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fermi_dirac_2(double x);
 --
@@ -97,23 +98,23 @@
 -- | wrapper for int gsl_sf_fermi_dirac_int_e(int j,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-fermi_dirac_int_e :: Int -> Double -> (Double,Double)
+fermi_dirac_int_e :: CInt -> Double -> (Double,Double)
 fermi_dirac_int_e j x = createSFR "fermi_dirac_int_e" $ gsl_sf_fermi_dirac_int_e j x
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int_e" gsl_sf_fermi_dirac_int_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int_e" gsl_sf_fermi_dirac_int_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fermi_dirac_int(int j,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-fermi_dirac_int :: Int -> Double -> Double
+fermi_dirac_int :: CInt -> Double -> Double
 fermi_dirac_int = gsl_sf_fermi_dirac_int
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int" gsl_sf_fermi_dirac_int :: Int -> Double -> Double
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int" gsl_sf_fermi_dirac_int :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_fermi_dirac_mhalf_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_mhalf_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 fermi_dirac_mhalf_e :: Double -> (Double,Double)
 fermi_dirac_mhalf_e x = createSFR "fermi_dirac_mhalf_e" $ gsl_sf_fermi_dirac_mhalf_e x
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf_e" gsl_sf_fermi_dirac_mhalf_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf_e" gsl_sf_fermi_dirac_mhalf_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fermi_dirac_mhalf(double x);
 --
@@ -127,7 +128,7 @@
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_half_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 fermi_dirac_half_e :: Double -> (Double,Double)
 fermi_dirac_half_e x = createSFR "fermi_dirac_half_e" $ gsl_sf_fermi_dirac_half_e x
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half_e" gsl_sf_fermi_dirac_half_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half_e" gsl_sf_fermi_dirac_half_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fermi_dirac_half(double x);
 --
@@ -141,7 +142,7 @@
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_3half_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 fermi_dirac_3half_e :: Double -> (Double,Double)
 fermi_dirac_3half_e x = createSFR "fermi_dirac_3half_e" $ gsl_sf_fermi_dirac_3half_e x
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half_e" gsl_sf_fermi_dirac_3half_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half_e" gsl_sf_fermi_dirac_3half_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fermi_dirac_3half(double x);
 --
@@ -155,7 +156,7 @@
 --   <http://www.google.com/search?q=gsl_sf_fermi_dirac_inc_0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 fermi_dirac_inc_0_e :: Double -> Double -> (Double,Double)
 fermi_dirac_inc_0_e x b = createSFR "fermi_dirac_inc_0_e" $ gsl_sf_fermi_dirac_inc_0_e x b
-foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_inc_0_e" gsl_sf_fermi_dirac_inc_0_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_inc_0_e" gsl_sf_fermi_dirac_inc_0_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fermi_dirac_inc_0(double x,double b);
 --
diff --git a/lib/Numeric/GSL/Special/Gamma.hs b/lib/Numeric/GSL/Special/Gamma.hs
--- a/lib/Numeric/GSL/Special/Gamma.hs
+++ b/lib/Numeric/GSL/Special/Gamma.hs
@@ -58,6 +58,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_lngamma_e(double x,gsl_sf_result* result);
@@ -65,7 +66,7 @@
 --   <http://www.google.com/search?q=gsl_sf_lngamma_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 lngamma_e :: Double -> (Double,Double)
 lngamma_e x = createSFR "lngamma_e" $ gsl_sf_lngamma_e x
-foreign import ccall "gamma.h gsl_sf_lngamma_e" gsl_sf_lngamma_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_lngamma_e" gsl_sf_lngamma_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lngamma(double x);
 --
@@ -77,16 +78,16 @@
 -- | wrapper for int gsl_sf_lngamma_sgn_e(double x,gsl_sf_result* result_lg,double* sgn);
 --
 --   <http://www.google.com/search?q=gsl_sf_lngamma_sgn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int
+lngamma_sgn_e :: Double -> Ptr () -> Ptr Double -> CInt
 lngamma_sgn_e = gsl_sf_lngamma_sgn_e
-foreign import ccall "gamma.h gsl_sf_lngamma_sgn_e" gsl_sf_lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "gamma.h gsl_sf_lngamma_sgn_e" gsl_sf_lngamma_sgn_e :: Double -> Ptr () -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_gamma_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_gamma_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 gamma_e :: Double -> (Double,Double)
 gamma_e x = createSFR "gamma_e" $ gsl_sf_gamma_e x
-foreign import ccall "gamma.h gsl_sf_gamma_e" gsl_sf_gamma_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_gamma_e" gsl_sf_gamma_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_gamma(double x);
 --
@@ -100,7 +101,7 @@
 --   <http://www.google.com/search?q=gsl_sf_gammastar_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 gammastar_e :: Double -> (Double,Double)
 gammastar_e x = createSFR "gammastar_e" $ gsl_sf_gammastar_e x
-foreign import ccall "gamma.h gsl_sf_gammastar_e" gsl_sf_gammastar_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_gammastar_e" gsl_sf_gammastar_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_gammastar(double x);
 --
@@ -114,7 +115,7 @@
 --   <http://www.google.com/search?q=gsl_sf_gammainv_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 gammainv_e :: Double -> (Double,Double)
 gammainv_e x = createSFR "gammainv_e" $ gsl_sf_gammainv_e x
-foreign import ccall "gamma.h gsl_sf_gammainv_e" gsl_sf_gammainv_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_gammainv_e" gsl_sf_gammainv_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_gammainv(double x);
 --
@@ -126,114 +127,114 @@
 -- | wrapper for int gsl_sf_lngamma_complex_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* arg);
 --
 --   <http://www.google.com/search?q=gsl_sf_lngamma_complex_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-lngamma_complex_e :: Double -> Double -> Ptr Double -> (Double,Double)
+lngamma_complex_e :: Double -> Double -> Ptr () -> (Double,Double)
 lngamma_complex_e zr zi lnr = createSFR "lngamma_complex_e" $ gsl_sf_lngamma_complex_e zr zi lnr
-foreign import ccall "gamma.h gsl_sf_lngamma_complex_e" gsl_sf_lngamma_complex_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_lngamma_complex_e" gsl_sf_lngamma_complex_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_taylorcoeff_e(int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_taylorcoeff_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-taylorcoeff_e :: Int -> Double -> (Double,Double)
+taylorcoeff_e :: CInt -> Double -> (Double,Double)
 taylorcoeff_e n x = createSFR "taylorcoeff_e" $ gsl_sf_taylorcoeff_e n x
-foreign import ccall "gamma.h gsl_sf_taylorcoeff_e" gsl_sf_taylorcoeff_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_taylorcoeff_e" gsl_sf_taylorcoeff_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_taylorcoeff(int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_taylorcoeff&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-taylorcoeff :: Int -> Double -> Double
+taylorcoeff :: CInt -> Double -> Double
 taylorcoeff = gsl_sf_taylorcoeff
-foreign import ccall "gamma.h gsl_sf_taylorcoeff" gsl_sf_taylorcoeff :: Int -> Double -> Double
+foreign import ccall "gamma.h gsl_sf_taylorcoeff" gsl_sf_taylorcoeff :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_fact_e(int n,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_fact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-fact_e :: Int -> (Double,Double)
+fact_e :: CInt -> (Double,Double)
 fact_e n = createSFR "fact_e" $ gsl_sf_fact_e n
-foreign import ccall "gamma.h gsl_sf_fact_e" gsl_sf_fact_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_fact_e" gsl_sf_fact_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_fact(int n);
 --
 --   <http://www.google.com/search?q=gsl_sf_fact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-fact :: Int -> Double
+fact :: CInt -> Double
 fact = gsl_sf_fact
-foreign import ccall "gamma.h gsl_sf_fact" gsl_sf_fact :: Int -> Double
+foreign import ccall "gamma.h gsl_sf_fact" gsl_sf_fact :: CInt -> Double
 
 -- | wrapper for int gsl_sf_doublefact_e(int n,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_doublefact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-doublefact_e :: Int -> (Double,Double)
+doublefact_e :: CInt -> (Double,Double)
 doublefact_e n = createSFR "doublefact_e" $ gsl_sf_doublefact_e n
-foreign import ccall "gamma.h gsl_sf_doublefact_e" gsl_sf_doublefact_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_doublefact_e" gsl_sf_doublefact_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_doublefact(int n);
 --
 --   <http://www.google.com/search?q=gsl_sf_doublefact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-doublefact :: Int -> Double
+doublefact :: CInt -> Double
 doublefact = gsl_sf_doublefact
-foreign import ccall "gamma.h gsl_sf_doublefact" gsl_sf_doublefact :: Int -> Double
+foreign import ccall "gamma.h gsl_sf_doublefact" gsl_sf_doublefact :: CInt -> Double
 
 -- | wrapper for int gsl_sf_lnfact_e(int n,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_lnfact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-lnfact_e :: Int -> (Double,Double)
+lnfact_e :: CInt -> (Double,Double)
 lnfact_e n = createSFR "lnfact_e" $ gsl_sf_lnfact_e n
-foreign import ccall "gamma.h gsl_sf_lnfact_e" gsl_sf_lnfact_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_lnfact_e" gsl_sf_lnfact_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lnfact(int n);
 --
 --   <http://www.google.com/search?q=gsl_sf_lnfact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-lnfact :: Int -> Double
+lnfact :: CInt -> Double
 lnfact = gsl_sf_lnfact
-foreign import ccall "gamma.h gsl_sf_lnfact" gsl_sf_lnfact :: Int -> Double
+foreign import ccall "gamma.h gsl_sf_lnfact" gsl_sf_lnfact :: CInt -> Double
 
 -- | wrapper for int gsl_sf_lndoublefact_e(int n,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_lndoublefact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-lndoublefact_e :: Int -> (Double,Double)
+lndoublefact_e :: CInt -> (Double,Double)
 lndoublefact_e n = createSFR "lndoublefact_e" $ gsl_sf_lndoublefact_e n
-foreign import ccall "gamma.h gsl_sf_lndoublefact_e" gsl_sf_lndoublefact_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_lndoublefact_e" gsl_sf_lndoublefact_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lndoublefact(int n);
 --
 --   <http://www.google.com/search?q=gsl_sf_lndoublefact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-lndoublefact :: Int -> Double
+lndoublefact :: CInt -> Double
 lndoublefact = gsl_sf_lndoublefact
-foreign import ccall "gamma.h gsl_sf_lndoublefact" gsl_sf_lndoublefact :: Int -> Double
+foreign import ccall "gamma.h gsl_sf_lndoublefact" gsl_sf_lndoublefact :: CInt -> Double
 
 -- | wrapper for int gsl_sf_lnchoose_e(int n,int m,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_lnchoose_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-lnchoose_e :: Int -> Int -> (Double,Double)
+lnchoose_e :: CInt -> CInt -> (Double,Double)
 lnchoose_e n m = createSFR "lnchoose_e" $ gsl_sf_lnchoose_e n m
-foreign import ccall "gamma.h gsl_sf_lnchoose_e" gsl_sf_lnchoose_e :: Int -> Int -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_lnchoose_e" gsl_sf_lnchoose_e :: CInt -> CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lnchoose(int n,int m);
 --
 --   <http://www.google.com/search?q=gsl_sf_lnchoose&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-lnchoose :: Int -> Int -> Double
+lnchoose :: CInt -> CInt -> Double
 lnchoose = gsl_sf_lnchoose
-foreign import ccall "gamma.h gsl_sf_lnchoose" gsl_sf_lnchoose :: Int -> Int -> Double
+foreign import ccall "gamma.h gsl_sf_lnchoose" gsl_sf_lnchoose :: CInt -> CInt -> Double
 
 -- | wrapper for int gsl_sf_choose_e(int n,int m,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_choose_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-choose_e :: Int -> Int -> (Double,Double)
+choose_e :: CInt -> CInt -> (Double,Double)
 choose_e n m = createSFR "choose_e" $ gsl_sf_choose_e n m
-foreign import ccall "gamma.h gsl_sf_choose_e" gsl_sf_choose_e :: Int -> Int -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_choose_e" gsl_sf_choose_e :: CInt -> CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_choose(int n,int m);
 --
 --   <http://www.google.com/search?q=gsl_sf_choose&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-choose :: Int -> Int -> Double
+choose :: CInt -> CInt -> Double
 choose = gsl_sf_choose
-foreign import ccall "gamma.h gsl_sf_choose" gsl_sf_choose :: Int -> Int -> Double
+foreign import ccall "gamma.h gsl_sf_choose" gsl_sf_choose :: CInt -> CInt -> Double
 
 -- | wrapper for int gsl_sf_lnpoch_e(double a,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_lnpoch_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 lnpoch_e :: Double -> Double -> (Double,Double)
 lnpoch_e a x = createSFR "lnpoch_e" $ gsl_sf_lnpoch_e a x
-foreign import ccall "gamma.h gsl_sf_lnpoch_e" gsl_sf_lnpoch_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_lnpoch_e" gsl_sf_lnpoch_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lnpoch(double a,double x);
 --
@@ -245,16 +246,16 @@
 -- | wrapper for int gsl_sf_lnpoch_sgn_e(double a,double x,gsl_sf_result* result,double* sgn);
 --
 --   <http://www.google.com/search?q=gsl_sf_lnpoch_sgn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int
+lnpoch_sgn_e :: Double -> Double -> Ptr () -> Ptr Double -> CInt
 lnpoch_sgn_e = gsl_sf_lnpoch_sgn_e
-foreign import ccall "gamma.h gsl_sf_lnpoch_sgn_e" gsl_sf_lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "gamma.h gsl_sf_lnpoch_sgn_e" gsl_sf_lnpoch_sgn_e :: Double -> Double -> Ptr () -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_poch_e(double a,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_poch_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 poch_e :: Double -> Double -> (Double,Double)
 poch_e a x = createSFR "poch_e" $ gsl_sf_poch_e a x
-foreign import ccall "gamma.h gsl_sf_poch_e" gsl_sf_poch_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_poch_e" gsl_sf_poch_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_poch(double a,double x);
 --
@@ -268,7 +269,7 @@
 --   <http://www.google.com/search?q=gsl_sf_pochrel_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 pochrel_e :: Double -> Double -> (Double,Double)
 pochrel_e a x = createSFR "pochrel_e" $ gsl_sf_pochrel_e a x
-foreign import ccall "gamma.h gsl_sf_pochrel_e" gsl_sf_pochrel_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_pochrel_e" gsl_sf_pochrel_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_pochrel(double a,double x);
 --
@@ -282,7 +283,7 @@
 --   <http://www.google.com/search?q=gsl_sf_gamma_inc_Q_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 gamma_inc_Q_e :: Double -> Double -> (Double,Double)
 gamma_inc_Q_e a x = createSFR "gamma_inc_Q_e" $ gsl_sf_gamma_inc_Q_e a x
-foreign import ccall "gamma.h gsl_sf_gamma_inc_Q_e" gsl_sf_gamma_inc_Q_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_gamma_inc_Q_e" gsl_sf_gamma_inc_Q_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_gamma_inc_Q(double a,double x);
 --
@@ -296,7 +297,7 @@
 --   <http://www.google.com/search?q=gsl_sf_gamma_inc_P_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 gamma_inc_P_e :: Double -> Double -> (Double,Double)
 gamma_inc_P_e a x = createSFR "gamma_inc_P_e" $ gsl_sf_gamma_inc_P_e a x
-foreign import ccall "gamma.h gsl_sf_gamma_inc_P_e" gsl_sf_gamma_inc_P_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_gamma_inc_P_e" gsl_sf_gamma_inc_P_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_gamma_inc_P(double a,double x);
 --
@@ -310,7 +311,7 @@
 --   <http://www.google.com/search?q=gsl_sf_gamma_inc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 gamma_inc_e :: Double -> Double -> (Double,Double)
 gamma_inc_e a x = createSFR "gamma_inc_e" $ gsl_sf_gamma_inc_e a x
-foreign import ccall "gamma.h gsl_sf_gamma_inc_e" gsl_sf_gamma_inc_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_gamma_inc_e" gsl_sf_gamma_inc_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_gamma_inc(double a,double x);
 --
@@ -324,7 +325,7 @@
 --   <http://www.google.com/search?q=gsl_sf_lnbeta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 lnbeta_e :: Double -> Double -> (Double,Double)
 lnbeta_e a b = createSFR "lnbeta_e" $ gsl_sf_lnbeta_e a b
-foreign import ccall "gamma.h gsl_sf_lnbeta_e" gsl_sf_lnbeta_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_lnbeta_e" gsl_sf_lnbeta_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lnbeta(double a,double b);
 --
@@ -333,12 +334,19 @@
 lnbeta = gsl_sf_lnbeta
 foreign import ccall "gamma.h gsl_sf_lnbeta" gsl_sf_lnbeta :: Double -> Double -> Double
 
+-- | wrapper for int gsl_sf_lnbeta_sgn_e(double x,double y,gsl_sf_result* result,double* sgn);
+--
+--   <http://www.google.com/search?q=gsl_sf_lnbeta_sgn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+lnbeta_sgn_e :: Double -> Double -> Ptr () -> Ptr Double -> CInt
+lnbeta_sgn_e = gsl_sf_lnbeta_sgn_e
+foreign import ccall "gamma.h gsl_sf_lnbeta_sgn_e" gsl_sf_lnbeta_sgn_e :: Double -> Double -> Ptr () -> Ptr Double -> CInt
+
 -- | wrapper for int gsl_sf_beta_e(double a,double b,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_beta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 beta_e :: Double -> Double -> (Double,Double)
 beta_e a b = createSFR "beta_e" $ gsl_sf_beta_e a b
-foreign import ccall "gamma.h gsl_sf_beta_e" gsl_sf_beta_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_beta_e" gsl_sf_beta_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_beta(double a,double b);
 --
@@ -352,7 +360,7 @@
 --   <http://www.google.com/search?q=gsl_sf_beta_inc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 beta_inc_e :: Double -> Double -> Double -> (Double,Double)
 beta_inc_e a b x = createSFR "beta_inc_e" $ gsl_sf_beta_inc_e a b x
-foreign import ccall "gamma.h gsl_sf_beta_inc_e" gsl_sf_beta_inc_e :: Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gamma.h gsl_sf_beta_inc_e" gsl_sf_beta_inc_e :: Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_beta_inc(double a,double b,double x);
 --
diff --git a/lib/Numeric/GSL/Special/Gegenbauer.hs b/lib/Numeric/GSL/Special/Gegenbauer.hs
--- a/lib/Numeric/GSL/Special/Gegenbauer.hs
+++ b/lib/Numeric/GSL/Special/Gegenbauer.hs
@@ -26,6 +26,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_gegenpoly_1_e(double lambda,double x,gsl_sf_result* result);
@@ -33,21 +34,21 @@
 --   <http://www.google.com/search?q=gsl_sf_gegenpoly_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 gegenpoly_1_e :: Double -> Double -> (Double,Double)
 gegenpoly_1_e lambda x = createSFR "gegenpoly_1_e" $ gsl_sf_gegenpoly_1_e lambda x
-foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1_e" gsl_sf_gegenpoly_1_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1_e" gsl_sf_gegenpoly_1_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_gegenpoly_2_e(double lambda,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_gegenpoly_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 gegenpoly_2_e :: Double -> Double -> (Double,Double)
 gegenpoly_2_e lambda x = createSFR "gegenpoly_2_e" $ gsl_sf_gegenpoly_2_e lambda x
-foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2_e" gsl_sf_gegenpoly_2_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2_e" gsl_sf_gegenpoly_2_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_gegenpoly_3_e(double lambda,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_gegenpoly_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 gegenpoly_3_e :: Double -> Double -> (Double,Double)
 gegenpoly_3_e lambda x = createSFR "gegenpoly_3_e" $ gsl_sf_gegenpoly_3_e lambda x
-foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3_e" gsl_sf_gegenpoly_3_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3_e" gsl_sf_gegenpoly_3_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_gegenpoly_1(double lambda,double x);
 --
@@ -73,20 +74,20 @@
 -- | wrapper for int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_gegenpoly_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-gegenpoly_n_e :: Int -> Double -> Double -> (Double,Double)
+gegenpoly_n_e :: CInt -> Double -> Double -> (Double,Double)
 gegenpoly_n_e n lambda x = createSFR "gegenpoly_n_e" $ gsl_sf_gegenpoly_n_e n lambda x
-foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n_e" gsl_sf_gegenpoly_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n_e" gsl_sf_gegenpoly_n_e :: CInt -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_gegenpoly_n(int n,double lambda,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_gegenpoly_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-gegenpoly_n :: Int -> Double -> Double -> Double
+gegenpoly_n :: CInt -> Double -> Double -> Double
 gegenpoly_n = gsl_sf_gegenpoly_n
-foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n" gsl_sf_gegenpoly_n :: Int -> Double -> Double -> Double
+foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n" gsl_sf_gegenpoly_n :: CInt -> Double -> Double -> Double
 
 -- | wrapper for int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array);
 --
 --   <http://www.google.com/search?q=gsl_sf_gegenpoly_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int
+gegenpoly_array :: CInt -> Double -> Double -> Ptr Double -> CInt
 gegenpoly_array = gsl_sf_gegenpoly_array
-foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_array" gsl_sf_gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int
+foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_array" gsl_sf_gegenpoly_array :: CInt -> Double -> Double -> Ptr Double -> CInt
diff --git a/lib/Numeric/GSL/Special/Hyperg.hs b/lib/Numeric/GSL/Special/Hyperg.hs
--- a/lib/Numeric/GSL/Special/Hyperg.hs
+++ b/lib/Numeric/GSL/Special/Hyperg.hs
@@ -40,6 +40,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_hyperg_0F1_e(double c,double x,gsl_sf_result* result);
@@ -47,7 +48,7 @@
 --   <http://www.google.com/search?q=gsl_sf_hyperg_0F1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hyperg_0F1_e :: Double -> Double -> (Double,Double)
 hyperg_0F1_e c x = createSFR "hyperg_0F1_e" $ gsl_sf_hyperg_0F1_e c x
-foreign import ccall "hyperg.h gsl_sf_hyperg_0F1_e" gsl_sf_hyperg_0F1_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_0F1_e" gsl_sf_hyperg_0F1_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_0F1(double c,double x);
 --
@@ -59,23 +60,23 @@
 -- | wrapper for int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_hyperg_1F1_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-hyperg_1F1_int_e :: Int -> Int -> Double -> (Double,Double)
+hyperg_1F1_int_e :: CInt -> CInt -> Double -> (Double,Double)
 hyperg_1F1_int_e m n x = createSFR "hyperg_1F1_int_e" $ gsl_sf_hyperg_1F1_int_e m n x
-foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int_e" gsl_sf_hyperg_1F1_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int_e" gsl_sf_hyperg_1F1_int_e :: CInt -> CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_1F1_int(int m,int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_hyperg_1F1_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-hyperg_1F1_int :: Int -> Int -> Double -> Double
+hyperg_1F1_int :: CInt -> CInt -> Double -> Double
 hyperg_1F1_int = gsl_sf_hyperg_1F1_int
-foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int" gsl_sf_hyperg_1F1_int :: Int -> Int -> Double -> Double
+foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int" gsl_sf_hyperg_1F1_int :: CInt -> CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_hyperg_1F1_e(double a,double b,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_hyperg_1F1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hyperg_1F1_e :: Double -> Double -> Double -> (Double,Double)
 hyperg_1F1_e a b x = createSFR "hyperg_1F1_e" $ gsl_sf_hyperg_1F1_e a b x
-foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_e" gsl_sf_hyperg_1F1_e :: Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_e" gsl_sf_hyperg_1F1_e :: Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_1F1(double a,double b,double x);
 --
@@ -87,30 +88,30 @@
 -- | wrapper for int gsl_sf_hyperg_U_int_e(int m,int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_hyperg_U_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-hyperg_U_int_e :: Int -> Int -> Double -> (Double,Double)
+hyperg_U_int_e :: CInt -> CInt -> Double -> (Double,Double)
 hyperg_U_int_e m n x = createSFR "hyperg_U_int_e" $ gsl_sf_hyperg_U_int_e m n x
-foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e" gsl_sf_hyperg_U_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e" gsl_sf_hyperg_U_int_e :: CInt -> CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_U_int(int m,int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_hyperg_U_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-hyperg_U_int :: Int -> Int -> Double -> Double
+hyperg_U_int :: CInt -> CInt -> Double -> Double
 hyperg_U_int = gsl_sf_hyperg_U_int
-foreign import ccall "hyperg.h gsl_sf_hyperg_U_int" gsl_sf_hyperg_U_int :: Int -> Int -> Double -> Double
+foreign import ccall "hyperg.h gsl_sf_hyperg_U_int" gsl_sf_hyperg_U_int :: CInt -> CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,gsl_sf_result_e10* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_hyperg_U_int_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-hyperg_U_int_e10_e :: Int -> Int -> Double -> (Double,Int,Double)
+hyperg_U_int_e10_e :: CInt -> CInt -> Double -> (Double,Int,Double)
 hyperg_U_int_e10_e m n x = createSFR_E10 "hyperg_U_int_e10_e" $ gsl_sf_hyperg_U_int_e10_e m n x
-foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e10_e" gsl_sf_hyperg_U_int_e10_e :: Int -> Int -> Double -> Ptr () -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e10_e" gsl_sf_hyperg_U_int_e10_e :: CInt -> CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_hyperg_U_e(double a,double b,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_hyperg_U_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hyperg_U_e :: Double -> Double -> Double -> (Double,Double)
 hyperg_U_e a b x = createSFR "hyperg_U_e" $ gsl_sf_hyperg_U_e a b x
-foreign import ccall "hyperg.h gsl_sf_hyperg_U_e" gsl_sf_hyperg_U_e :: Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_U_e" gsl_sf_hyperg_U_e :: Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_U(double a,double b,double x);
 --
@@ -124,14 +125,14 @@
 --   <http://www.google.com/search?q=gsl_sf_hyperg_U_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hyperg_U_e10_e :: Double -> Double -> Double -> (Double,Int,Double)
 hyperg_U_e10_e a b x = createSFR_E10 "hyperg_U_e10_e" $ gsl_sf_hyperg_U_e10_e a b x
-foreign import ccall "hyperg.h gsl_sf_hyperg_U_e10_e" gsl_sf_hyperg_U_e10_e :: Double -> Double -> Double -> Ptr () -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_U_e10_e" gsl_sf_hyperg_U_e10_e :: Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_hyperg_2F1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hyperg_2F1_e :: Double -> Double -> Double -> Double -> (Double,Double)
 hyperg_2F1_e a b c x = createSFR "hyperg_2F1_e" $ gsl_sf_hyperg_2F1_e a b c x
-foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_e" gsl_sf_hyperg_2F1_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_e" gsl_sf_hyperg_2F1_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_2F1(double a,double b,double c,double x);
 --
@@ -145,7 +146,7 @@
 --   <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> (Double,Double)
 hyperg_2F1_conj_e aR aI c x = createSFR "hyperg_2F1_conj_e" $ gsl_sf_hyperg_2F1_conj_e aR aI c x
-foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_e" gsl_sf_hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_e" gsl_sf_hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x);
 --
@@ -159,7 +160,7 @@
 --   <http://www.google.com/search?q=gsl_sf_hyperg_2F1_renorm_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double)
 hyperg_2F1_renorm_e a b c x = createSFR "hyperg_2F1_renorm_e" $ gsl_sf_hyperg_2F1_renorm_e a b c x
-foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm_e" gsl_sf_hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm_e" gsl_sf_hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x);
 --
@@ -173,7 +174,7 @@
 --   <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj_renorm_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double)
 hyperg_2F1_conj_renorm_e aR aI c x = createSFR "hyperg_2F1_conj_renorm_e" $ gsl_sf_hyperg_2F1_conj_renorm_e aR aI c x
-foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm_e" gsl_sf_hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm_e" gsl_sf_hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x);
 --
@@ -187,7 +188,7 @@
 --   <http://www.google.com/search?q=gsl_sf_hyperg_2F0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hyperg_2F0_e :: Double -> Double -> Double -> (Double,Double)
 hyperg_2F0_e a b x = createSFR "hyperg_2F0_e" $ gsl_sf_hyperg_2F0_e a b x
-foreign import ccall "hyperg.h gsl_sf_hyperg_2F0_e" gsl_sf_hyperg_2F0_e :: Double -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "hyperg.h gsl_sf_hyperg_2F0_e" gsl_sf_hyperg_2F0_e :: Double -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hyperg_2F0(double a,double b,double x);
 --
diff --git a/lib/Numeric/GSL/Special/Internal.hs b/lib/Numeric/GSL/Special/Internal.hs
deleted file mode 100644
--- a/lib/Numeric/GSL/Special/Internal.hs
+++ /dev/null
@@ -1,68 +0,0 @@
-{-# OPTIONS #-}
------------------------------------------------------------------------------
-{- |
-Module      :  Numeric.GSL.Special.Internal
-Copyright   :  (c) Alberto Ruiz 2007
-License     :  GPL-style
-
-Maintainer  :  Alberto Ruiz (aruiz at um dot es)
-Stability   :  provisional
-Portability :  uses ffi
-
-Support for Special functions.
-
-<http://www.gnu.org/software/gsl/manual/html_node/Special-Functions.html#Special-Functions>
--}
------------------------------------------------------------------------------
-
-module Numeric.GSL.Special.Internal (
-    createSFR,
-    createSFR_E10,
-    Precision(..),
-    Gsl_mode_t,
-    Size_t,
-    precCode
-)
-where
-
-import Foreign
-import Data.Packed.Internal(check,(//))
-
-
-data Precision = PrecDouble | PrecSingle | PrecApprox
-
-precCode :: Precision -> Int
-precCode PrecDouble = 0
-precCode PrecSingle = 1
-precCode PrecApprox = 2
-
-type Gsl_mode_t = Int
-
-type Size_t = Int
-
-----------------------------------------------------------------
--- | access to a sf_result
-createSFR :: Storable a => String -> (Ptr a -> IO Int) -> (a, a)
-createSFR s f = unsafePerformIO $ do
-    p <- mallocArray 2
-    f p // check s
-    [val,err] <- peekArray 2 p
-    free p
-    return (val,err)
-
-
----------------------------------------------------------------------
--- the sf_result_e10 contains two doubles and the exponent
-
--- | acces to sf_result_e10
-createSFR_E10 :: (Storable t2, Storable t3, Storable t1) => String -> (Ptr a -> IO Int) -> (t1, t2, t3)
-createSFR_E10 s f = unsafePerformIO $ do
-    let sd = sizeOf (0::Double)
-    let si = sizeOf (0::Int)
-    p <- mallocBytes (2*sd + si)
-    f p // check s
-    val <- peekByteOff p 0
-    err <- peekByteOff p sd
-    expo <- peekByteOff p (2*sd) 
-    free p
-    return (val,expo,err)
diff --git a/lib/Numeric/GSL/Special/Internal.hsc b/lib/Numeric/GSL/Special/Internal.hsc
new file mode 100644
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Internal.hsc
@@ -0,0 +1,102 @@
+{-# OPTIONS -ffi #-}
+-----------------------------------------------------------------------------
+{- |
+Module      :  Numeric.GSL.Special.Internal
+Copyright   :  (c) Alberto Ruiz 2007
+License     :  GPL-style
+
+Maintainer  :  Alberto Ruiz (aruiz at um dot es)
+Stability   :  provisional
+Portability :  uses ffi
+
+Support for Special functions.
+
+<http://www.gnu.org/software/gsl/manual/html_node/Special-Functions.html#Special-Functions>
+-}
+-----------------------------------------------------------------------------
+
+#include <gsl/gsl_sf_result.h>
+#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
+
+module Numeric.GSL.Special.Internal (
+    createSFR,
+    createSFR_E10,
+    Precision(..),
+    Gsl_mode_t,
+    Size_t,
+    precCode
+)
+where
+
+import Foreign
+import Data.Packed.Internal(check,(//))
+import Foreign.C.Types(CSize,CInt)
+
+
+data Precision = PrecDouble | PrecSingle | PrecApprox
+
+precCode :: Precision -> Int
+precCode PrecDouble = 0
+precCode PrecSingle = 1
+precCode PrecApprox = 2
+
+type Gsl_mode_t = Int
+
+type Size_t = CSize
+
+---------------------------------------------------
+
+data Gsl_sf_result = SF Double Double
+  deriving (Show)
+
+instance Storable Gsl_sf_result where
+  sizeOf _ = #size gsl_sf_result
+  alignment _ = #alignment gsl_sf_result
+  peek ptr = do
+    val <- (#peek gsl_sf_result, val) ptr
+    err <- (#peek gsl_sf_result, err) ptr
+    return (SF val err)
+  poke ptr (SF val err) = do
+    (#poke gsl_sf_result, val) ptr val
+    (#poke gsl_sf_result, err) ptr err
+
+
+data Gsl_sf_result_e10 = SFE Double Double CInt
+  deriving (Show)
+
+instance Storable Gsl_sf_result_e10 where
+  sizeOf _ = #size gsl_sf_result_e10
+  alignment _ = #alignment gsl_sf_result_e10
+  peek ptr = do
+    val <- (#peek gsl_sf_result_e10, val) ptr
+    err <- (#peek gsl_sf_result_e10, err) ptr
+    e10 <- (#peek gsl_sf_result_e10, e10) ptr
+    return (SFE val err e10)
+  poke ptr (SFE val err e10) = do
+    (#poke gsl_sf_result_e10, val) ptr val
+    (#poke gsl_sf_result_e10, err) ptr err
+    (#poke gsl_sf_result_e10, e10) ptr e10
+
+
+----------------------------------------------------------------
+-- | access to a sf_result
+createSFR :: String -> (Ptr a -> IO CInt) -> (Double, Double)
+createSFR s f = unsafePerformIO $ do
+    p <- malloc :: IO (Ptr Gsl_sf_result)
+    f (castPtr p) // check s
+    SF val err <- peek p
+    free p
+    return (val,err)
+
+
+---------------------------------------------------------------------
+-- the sf_result_e10 contains two doubles and the exponent
+
+-- | access to sf_result_e10
+createSFR_E10 :: String -> (Ptr a -> IO CInt) -> (Double, Int, Double)
+createSFR_E10 s f = unsafePerformIO $ do
+    p <- malloc :: IO (Ptr Gsl_sf_result_e10)
+    f (castPtr p) // check s
+    SFE val err expo  <- peek p
+    free p
+    return (val, fromIntegral expo,err)
diff --git a/lib/Numeric/GSL/Special/Laguerre.hs b/lib/Numeric/GSL/Special/Laguerre.hs
--- a/lib/Numeric/GSL/Special/Laguerre.hs
+++ b/lib/Numeric/GSL/Special/Laguerre.hs
@@ -26,6 +26,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_laguerre_1_e(double a,double x,gsl_sf_result* result);
@@ -33,21 +34,21 @@
 --   <http://www.google.com/search?q=gsl_sf_laguerre_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 laguerre_1_e :: Double -> Double -> (Double,Double)
 laguerre_1_e a x = createSFR "laguerre_1_e" $ gsl_sf_laguerre_1_e a x
-foreign import ccall "laguerre.h gsl_sf_laguerre_1_e" gsl_sf_laguerre_1_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "laguerre.h gsl_sf_laguerre_1_e" gsl_sf_laguerre_1_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_laguerre_2_e(double a,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_laguerre_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 laguerre_2_e :: Double -> Double -> (Double,Double)
 laguerre_2_e a x = createSFR "laguerre_2_e" $ gsl_sf_laguerre_2_e a x
-foreign import ccall "laguerre.h gsl_sf_laguerre_2_e" gsl_sf_laguerre_2_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "laguerre.h gsl_sf_laguerre_2_e" gsl_sf_laguerre_2_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_laguerre_3_e(double a,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_laguerre_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 laguerre_3_e :: Double -> Double -> (Double,Double)
 laguerre_3_e a x = createSFR "laguerre_3_e" $ gsl_sf_laguerre_3_e a x
-foreign import ccall "laguerre.h gsl_sf_laguerre_3_e" gsl_sf_laguerre_3_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "laguerre.h gsl_sf_laguerre_3_e" gsl_sf_laguerre_3_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_laguerre_1(double a,double x);
 --
@@ -73,13 +74,13 @@
 -- | wrapper for int gsl_sf_laguerre_n_e(int n,double a,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_laguerre_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-laguerre_n_e :: Int -> Double -> Double -> (Double,Double)
+laguerre_n_e :: CInt -> Double -> Double -> (Double,Double)
 laguerre_n_e n a x = createSFR "laguerre_n_e" $ gsl_sf_laguerre_n_e n a x
-foreign import ccall "laguerre.h gsl_sf_laguerre_n_e" gsl_sf_laguerre_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "laguerre.h gsl_sf_laguerre_n_e" gsl_sf_laguerre_n_e :: CInt -> Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_laguerre_n(int n,double a,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_laguerre_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-laguerre_n :: Int -> Double -> Double -> Double
+laguerre_n :: CInt -> Double -> Double -> Double
 laguerre_n = gsl_sf_laguerre_n
-foreign import ccall "laguerre.h gsl_sf_laguerre_n" gsl_sf_laguerre_n :: Int -> Double -> Double -> Double
+foreign import ccall "laguerre.h gsl_sf_laguerre_n" gsl_sf_laguerre_n :: CInt -> Double -> Double -> Double
diff --git a/lib/Numeric/GSL/Special/Lambert.hs b/lib/Numeric/GSL/Special/Lambert.hs
--- a/lib/Numeric/GSL/Special/Lambert.hs
+++ b/lib/Numeric/GSL/Special/Lambert.hs
@@ -22,6 +22,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_lambert_W0_e(double x,gsl_sf_result* result);
@@ -29,7 +30,7 @@
 --   <http://www.google.com/search?q=gsl_sf_lambert_W0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 lambert_W0_e :: Double -> (Double,Double)
 lambert_W0_e x = createSFR "lambert_W0_e" $ gsl_sf_lambert_W0_e x
-foreign import ccall "lambert.h gsl_sf_lambert_W0_e" gsl_sf_lambert_W0_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "lambert.h gsl_sf_lambert_W0_e" gsl_sf_lambert_W0_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lambert_W0(double x);
 --
@@ -43,7 +44,7 @@
 --   <http://www.google.com/search?q=gsl_sf_lambert_Wm1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 lambert_Wm1_e :: Double -> (Double,Double)
 lambert_Wm1_e x = createSFR "lambert_Wm1_e" $ gsl_sf_lambert_Wm1_e x
-foreign import ccall "lambert.h gsl_sf_lambert_Wm1_e" gsl_sf_lambert_Wm1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "lambert.h gsl_sf_lambert_Wm1_e" gsl_sf_lambert_Wm1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lambert_Wm1(double x);
 --
diff --git a/lib/Numeric/GSL/Special/Legendre.hs b/lib/Numeric/GSL/Special/Legendre.hs
--- a/lib/Numeric/GSL/Special/Legendre.hs
+++ b/lib/Numeric/GSL/Special/Legendre.hs
@@ -9,270 +9,341 @@
 
 Wrappers for selected functions described at:
 
-<http://www.gnu.org/software/gsl/manual/html_node/Legendre-Functions-and-Spherical-Harmonics.html>
+<http://www.google.com/search?q=gsl_sf_legendre.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 
 -}
 ------------------------------------------------------------
 
 module Numeric.GSL.Special.Legendre(
-  legendre_Pl_e
-, legendre_Pl
-, legendre_P1_e
-, legendre_P2_e
-, legendre_P3_e
+  legendre_Pl
 , legendre_P1
 , legendre_P2
 , legendre_P3
-, legendre_Q0_e
 , legendre_Q0
-, legendre_Q1_e
 , legendre_Q1
-, legendre_Ql_e
 , legendre_Ql
-, legendre_Plm_e
 , legendre_Plm
-, legendre_sphPlm_e
 , legendre_sphPlm
 , legendre_array_size
-, conicalP_half_e
 , conicalP_half
-, conicalP_mhalf_e
 , conicalP_mhalf
-, conicalP_0_e
 , conicalP_0
-, conicalP_1_e
 , conicalP_1
-, conicalP_sph_reg_e
 , conicalP_sph_reg
-, conicalP_cyl_reg_e
 , conicalP_cyl_reg
-, legendre_H3d_0_e
 , legendre_H3d_0
-, legendre_H3d_1_e
 , legendre_H3d_1
-, legendre_H3d_e
 , legendre_H3d
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
--- | wrapper for int gsl_sf_legendre_Pl_e(int l,double x,gsl_sf_result* result);
-legendre_Pl_e :: Int -> Double -> (Double,Double)
-legendre_Pl_e l x = createSFR "legendre_Pl_e" $ gsl_sf_legendre_Pl_e l x
-foreign import ccall "legendre.h gsl_sf_legendre_Pl_e" gsl_sf_legendre_Pl_e :: Int -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_Pl_e(int l,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Pl_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Pl_e :: CInt -> Double -> Ptr Double -> CInt
+legendre_Pl_e = gsl_sf_legendre_Pl_e
+foreign import ccall "legendre.h gsl_sf_legendre_Pl_e" gsl_sf_legendre_Pl_e :: CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_Pl(int l,double x);
-legendre_Pl :: Int -> Double -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Pl&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Pl :: CInt -> Double -> Double
 legendre_Pl = gsl_sf_legendre_Pl
-foreign import ccall "legendre.h gsl_sf_legendre_Pl" gsl_sf_legendre_Pl :: Int -> Double -> Double
+foreign import ccall "legendre.h gsl_sf_legendre_Pl" gsl_sf_legendre_Pl :: CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_legendre_Pl_array(int lmax,double x,double* result_array);
-legendre_Pl_array :: Int -> Double -> Ptr Double -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Pl_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Pl_array :: CInt -> Double -> Ptr Double -> CInt
 legendre_Pl_array = gsl_sf_legendre_Pl_array
-foreign import ccall "legendre.h gsl_sf_legendre_Pl_array" gsl_sf_legendre_Pl_array :: Int -> Double -> Ptr Double -> Int
+foreign import ccall "legendre.h gsl_sf_legendre_Pl_array" gsl_sf_legendre_Pl_array :: CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_legendre_Pl_deriv_array(int lmax,double x,double* result_array,double* result_deriv_array);
-legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Pl_deriv_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Pl_deriv_array :: CInt -> Double -> Ptr Double -> Ptr Double -> CInt
 legendre_Pl_deriv_array = gsl_sf_legendre_Pl_deriv_array
-foreign import ccall "legendre.h gsl_sf_legendre_Pl_deriv_array" gsl_sf_legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "legendre.h gsl_sf_legendre_Pl_deriv_array" gsl_sf_legendre_Pl_deriv_array :: CInt -> Double -> Ptr Double -> Ptr Double -> CInt
 
--- | wrapper for int gsl_sf_legendre_P1_e(double x,gsl_sf_result* result);
-legendre_P1_e :: Double -> (Double,Double)
-legendre_P1_e x = createSFR "legendre_P1_e" $ gsl_sf_legendre_P1_e x
-foreign import ccall "legendre.h gsl_sf_legendre_P1_e" gsl_sf_legendre_P1_e :: Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_P1_e(double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_P1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_P1_e :: Double -> Ptr Double -> CInt
+legendre_P1_e = gsl_sf_legendre_P1_e
+foreign import ccall "legendre.h gsl_sf_legendre_P1_e" gsl_sf_legendre_P1_e :: Double -> Ptr Double -> CInt
 
--- | wrapper for int gsl_sf_legendre_P2_e(double x,gsl_sf_result* result);
-legendre_P2_e :: Double -> (Double,Double)
-legendre_P2_e x = createSFR "legendre_P2_e" $ gsl_sf_legendre_P2_e x
-foreign import ccall "legendre.h gsl_sf_legendre_P2_e" gsl_sf_legendre_P2_e :: Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_P2_e(double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_P2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_P2_e :: Double -> Ptr Double -> CInt
+legendre_P2_e = gsl_sf_legendre_P2_e
+foreign import ccall "legendre.h gsl_sf_legendre_P2_e" gsl_sf_legendre_P2_e :: Double -> Ptr Double -> CInt
 
--- | wrapper for int gsl_sf_legendre_P3_e(double x,gsl_sf_result* result);
-legendre_P3_e :: Double -> (Double,Double)
-legendre_P3_e x = createSFR "legendre_P3_e" $ gsl_sf_legendre_P3_e x
-foreign import ccall "legendre.h gsl_sf_legendre_P3_e" gsl_sf_legendre_P3_e :: Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_P3_e(double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_P3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_P3_e :: Double -> Ptr Double -> CInt
+legendre_P3_e = gsl_sf_legendre_P3_e
+foreign import ccall "legendre.h gsl_sf_legendre_P3_e" gsl_sf_legendre_P3_e :: Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_P1(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_P1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 legendre_P1 :: Double -> Double
 legendre_P1 = gsl_sf_legendre_P1
 foreign import ccall "legendre.h gsl_sf_legendre_P1" gsl_sf_legendre_P1 :: Double -> Double
 
 -- | wrapper for double gsl_sf_legendre_P2(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_P2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 legendre_P2 :: Double -> Double
 legendre_P2 = gsl_sf_legendre_P2
 foreign import ccall "legendre.h gsl_sf_legendre_P2" gsl_sf_legendre_P2 :: Double -> Double
 
 -- | wrapper for double gsl_sf_legendre_P3(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_P3&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 legendre_P3 :: Double -> Double
 legendre_P3 = gsl_sf_legendre_P3
 foreign import ccall "legendre.h gsl_sf_legendre_P3" gsl_sf_legendre_P3 :: Double -> Double
 
--- | wrapper for int gsl_sf_legendre_Q0_e(double x,gsl_sf_result* result);
-legendre_Q0_e :: Double -> (Double,Double)
-legendre_Q0_e x = createSFR "legendre_Q0_e" $ gsl_sf_legendre_Q0_e x
-foreign import ccall "legendre.h gsl_sf_legendre_Q0_e" gsl_sf_legendre_Q0_e :: Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_Q0_e(double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Q0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Q0_e :: Double -> Ptr Double -> CInt
+legendre_Q0_e = gsl_sf_legendre_Q0_e
+foreign import ccall "legendre.h gsl_sf_legendre_Q0_e" gsl_sf_legendre_Q0_e :: Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_Q0(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Q0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 legendre_Q0 :: Double -> Double
 legendre_Q0 = gsl_sf_legendre_Q0
 foreign import ccall "legendre.h gsl_sf_legendre_Q0" gsl_sf_legendre_Q0 :: Double -> Double
 
--- | wrapper for int gsl_sf_legendre_Q1_e(double x,gsl_sf_result* result);
-legendre_Q1_e :: Double -> (Double,Double)
-legendre_Q1_e x = createSFR "legendre_Q1_e" $ gsl_sf_legendre_Q1_e x
-foreign import ccall "legendre.h gsl_sf_legendre_Q1_e" gsl_sf_legendre_Q1_e :: Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_Q1_e(double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Q1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Q1_e :: Double -> Ptr Double -> CInt
+legendre_Q1_e = gsl_sf_legendre_Q1_e
+foreign import ccall "legendre.h gsl_sf_legendre_Q1_e" gsl_sf_legendre_Q1_e :: Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_Q1(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Q1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 legendre_Q1 :: Double -> Double
 legendre_Q1 = gsl_sf_legendre_Q1
 foreign import ccall "legendre.h gsl_sf_legendre_Q1" gsl_sf_legendre_Q1 :: Double -> Double
 
--- | wrapper for int gsl_sf_legendre_Ql_e(int l,double x,gsl_sf_result* result);
-legendre_Ql_e :: Int -> Double -> (Double,Double)
-legendre_Ql_e l x = createSFR "legendre_Ql_e" $ gsl_sf_legendre_Ql_e l x
-foreign import ccall "legendre.h gsl_sf_legendre_Ql_e" gsl_sf_legendre_Ql_e :: Int -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_Ql_e(int l,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Ql_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Ql_e :: CInt -> Double -> Ptr Double -> CInt
+legendre_Ql_e = gsl_sf_legendre_Ql_e
+foreign import ccall "legendre.h gsl_sf_legendre_Ql_e" gsl_sf_legendre_Ql_e :: CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_Ql(int l,double x);
-legendre_Ql :: Int -> Double -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Ql&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Ql :: CInt -> Double -> Double
 legendre_Ql = gsl_sf_legendre_Ql
-foreign import ccall "legendre.h gsl_sf_legendre_Ql" gsl_sf_legendre_Ql :: Int -> Double -> Double
+foreign import ccall "legendre.h gsl_sf_legendre_Ql" gsl_sf_legendre_Ql :: CInt -> Double -> Double
 
--- | wrapper for int gsl_sf_legendre_Plm_e(int l,int m,double x,gsl_sf_result* result);
-legendre_Plm_e :: Int -> Int -> Double -> (Double,Double)
-legendre_Plm_e l m x = createSFR "legendre_Plm_e" $ gsl_sf_legendre_Plm_e l m x
-foreign import ccall "legendre.h gsl_sf_legendre_Plm_e" gsl_sf_legendre_Plm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_Plm_e(int l,int m,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Plm_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Plm_e :: CInt -> CInt -> Double -> Ptr Double -> CInt
+legendre_Plm_e = gsl_sf_legendre_Plm_e
+foreign import ccall "legendre.h gsl_sf_legendre_Plm_e" gsl_sf_legendre_Plm_e :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_Plm(int l,int m,double x);
-legendre_Plm :: Int -> Int -> Double -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Plm&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Plm :: CInt -> CInt -> Double -> Double
 legendre_Plm = gsl_sf_legendre_Plm
-foreign import ccall "legendre.h gsl_sf_legendre_Plm" gsl_sf_legendre_Plm :: Int -> Int -> Double -> Double
+foreign import ccall "legendre.h gsl_sf_legendre_Plm" gsl_sf_legendre_Plm :: CInt -> CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_legendre_Plm_array(int lmax,int m,double x,double* result_array);
-legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Plm_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Plm_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 legendre_Plm_array = gsl_sf_legendre_Plm_array
-foreign import ccall "legendre.h gsl_sf_legendre_Plm_array" gsl_sf_legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int
+foreign import ccall "legendre.h gsl_sf_legendre_Plm_array" gsl_sf_legendre_Plm_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_legendre_Plm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array);
-legendre_Plm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_Plm_deriv_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_Plm_deriv_array :: CInt -> CInt -> Double -> Ptr Double -> Ptr Double -> CInt
 legendre_Plm_deriv_array = gsl_sf_legendre_Plm_deriv_array
-foreign import ccall "legendre.h gsl_sf_legendre_Plm_deriv_array" gsl_sf_legendre_Plm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "legendre.h gsl_sf_legendre_Plm_deriv_array" gsl_sf_legendre_Plm_deriv_array :: CInt -> CInt -> Double -> Ptr Double -> Ptr Double -> CInt
 
--- | wrapper for int gsl_sf_legendre_sphPlm_e(int l,int m,double x,gsl_sf_result* result);
-legendre_sphPlm_e :: Int -> Int -> Double -> (Double,Double)
-legendre_sphPlm_e l m x = createSFR "legendre_sphPlm_e" $ gsl_sf_legendre_sphPlm_e l m x
-foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_e" gsl_sf_legendre_sphPlm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_sphPlm_e(int l,int m,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_sphPlm_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_sphPlm_e :: CInt -> CInt -> Double -> Ptr Double -> CInt
+legendre_sphPlm_e = gsl_sf_legendre_sphPlm_e
+foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_e" gsl_sf_legendre_sphPlm_e :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_sphPlm(int l,int m,double x);
-legendre_sphPlm :: Int -> Int -> Double -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_sphPlm&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_sphPlm :: CInt -> CInt -> Double -> Double
 legendre_sphPlm = gsl_sf_legendre_sphPlm
-foreign import ccall "legendre.h gsl_sf_legendre_sphPlm" gsl_sf_legendre_sphPlm :: Int -> Int -> Double -> Double
+foreign import ccall "legendre.h gsl_sf_legendre_sphPlm" gsl_sf_legendre_sphPlm :: CInt -> CInt -> Double -> Double
 
 -- | wrapper for int gsl_sf_legendre_sphPlm_array(int lmax,int m,double x,double* result_array);
-legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_sphPlm_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_sphPlm_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 legendre_sphPlm_array = gsl_sf_legendre_sphPlm_array
-foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_array" gsl_sf_legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int
+foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_array" gsl_sf_legendre_sphPlm_array :: CInt -> CInt -> Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_legendre_sphPlm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array);
-legendre_sphPlm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_sphPlm_deriv_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_sphPlm_deriv_array :: CInt -> CInt -> Double -> Ptr Double -> Ptr Double -> CInt
 legendre_sphPlm_deriv_array = gsl_sf_legendre_sphPlm_deriv_array
-foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_deriv_array" gsl_sf_legendre_sphPlm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int
+foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_deriv_array" gsl_sf_legendre_sphPlm_deriv_array :: CInt -> CInt -> Double -> Ptr Double -> Ptr Double -> CInt
 
 -- | wrapper for int gsl_sf_legendre_array_size(int lmax,int m);
-legendre_array_size :: Int -> Int -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_array_size&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_array_size :: CInt -> CInt -> CInt
 legendre_array_size = gsl_sf_legendre_array_size
-foreign import ccall "legendre.h gsl_sf_legendre_array_size" gsl_sf_legendre_array_size :: Int -> Int -> Int
+foreign import ccall "legendre.h gsl_sf_legendre_array_size" gsl_sf_legendre_array_size :: CInt -> CInt -> CInt
 
--- | wrapper for int gsl_sf_conicalP_half_e(double lambda,double x,gsl_sf_result* result);
-conicalP_half_e :: Double -> Double -> (Double,Double)
-conicalP_half_e lambda x = createSFR "conicalP_half_e" $ gsl_sf_conicalP_half_e lambda x
-foreign import ccall "legendre.h gsl_sf_conicalP_half_e" gsl_sf_conicalP_half_e :: Double -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_conicalP_half_e(double lambda,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_half_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+conicalP_half_e :: Double -> Double -> Ptr Double -> CInt
+conicalP_half_e = gsl_sf_conicalP_half_e
+foreign import ccall "legendre.h gsl_sf_conicalP_half_e" gsl_sf_conicalP_half_e :: Double -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_conicalP_half(double lambda,double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_half&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 conicalP_half :: Double -> Double -> Double
 conicalP_half = gsl_sf_conicalP_half
 foreign import ccall "legendre.h gsl_sf_conicalP_half" gsl_sf_conicalP_half :: Double -> Double -> Double
 
--- | wrapper for int gsl_sf_conicalP_mhalf_e(double lambda,double x,gsl_sf_result* result);
-conicalP_mhalf_e :: Double -> Double -> (Double,Double)
-conicalP_mhalf_e lambda x = createSFR "conicalP_mhalf_e" $ gsl_sf_conicalP_mhalf_e lambda x
-foreign import ccall "legendre.h gsl_sf_conicalP_mhalf_e" gsl_sf_conicalP_mhalf_e :: Double -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_conicalP_mhalf_e(double lambda,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_mhalf_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+conicalP_mhalf_e :: Double -> Double -> Ptr Double -> CInt
+conicalP_mhalf_e = gsl_sf_conicalP_mhalf_e
+foreign import ccall "legendre.h gsl_sf_conicalP_mhalf_e" gsl_sf_conicalP_mhalf_e :: Double -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_conicalP_mhalf(double lambda,double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_mhalf&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 conicalP_mhalf :: Double -> Double -> Double
 conicalP_mhalf = gsl_sf_conicalP_mhalf
 foreign import ccall "legendre.h gsl_sf_conicalP_mhalf" gsl_sf_conicalP_mhalf :: Double -> Double -> Double
 
--- | wrapper for int gsl_sf_conicalP_0_e(double lambda,double x,gsl_sf_result* result);
-conicalP_0_e :: Double -> Double -> (Double,Double)
-conicalP_0_e lambda x = createSFR "conicalP_0_e" $ gsl_sf_conicalP_0_e lambda x
-foreign import ccall "legendre.h gsl_sf_conicalP_0_e" gsl_sf_conicalP_0_e :: Double -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_conicalP_0_e(double lambda,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+conicalP_0_e :: Double -> Double -> Ptr Double -> CInt
+conicalP_0_e = gsl_sf_conicalP_0_e
+foreign import ccall "legendre.h gsl_sf_conicalP_0_e" gsl_sf_conicalP_0_e :: Double -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_conicalP_0(double lambda,double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 conicalP_0 :: Double -> Double -> Double
 conicalP_0 = gsl_sf_conicalP_0
 foreign import ccall "legendre.h gsl_sf_conicalP_0" gsl_sf_conicalP_0 :: Double -> Double -> Double
 
--- | wrapper for int gsl_sf_conicalP_1_e(double lambda,double x,gsl_sf_result* result);
-conicalP_1_e :: Double -> Double -> (Double,Double)
-conicalP_1_e lambda x = createSFR "conicalP_1_e" $ gsl_sf_conicalP_1_e lambda x
-foreign import ccall "legendre.h gsl_sf_conicalP_1_e" gsl_sf_conicalP_1_e :: Double -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_conicalP_1_e(double lambda,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+conicalP_1_e :: Double -> Double -> Ptr Double -> CInt
+conicalP_1_e = gsl_sf_conicalP_1_e
+foreign import ccall "legendre.h gsl_sf_conicalP_1_e" gsl_sf_conicalP_1_e :: Double -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_conicalP_1(double lambda,double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 conicalP_1 :: Double -> Double -> Double
 conicalP_1 = gsl_sf_conicalP_1
 foreign import ccall "legendre.h gsl_sf_conicalP_1" gsl_sf_conicalP_1 :: Double -> Double -> Double
 
--- | wrapper for int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,gsl_sf_result* result);
-conicalP_sph_reg_e :: Int -> Double -> Double -> (Double,Double)
-conicalP_sph_reg_e l lambda x = createSFR "conicalP_sph_reg_e" $ gsl_sf_conicalP_sph_reg_e l lambda x
-foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg_e" gsl_sf_conicalP_sph_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_sph_reg_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+conicalP_sph_reg_e :: CInt -> Double -> Double -> Ptr Double -> CInt
+conicalP_sph_reg_e = gsl_sf_conicalP_sph_reg_e
+foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg_e" gsl_sf_conicalP_sph_reg_e :: CInt -> Double -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_conicalP_sph_reg(int l,double lambda,double x);
-conicalP_sph_reg :: Int -> Double -> Double -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_sph_reg&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+conicalP_sph_reg :: CInt -> Double -> Double -> Double
 conicalP_sph_reg = gsl_sf_conicalP_sph_reg
-foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg" gsl_sf_conicalP_sph_reg :: Int -> Double -> Double -> Double
+foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg" gsl_sf_conicalP_sph_reg :: CInt -> Double -> Double -> Double
 
--- | wrapper for int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,gsl_sf_result* result);
-conicalP_cyl_reg_e :: Int -> Double -> Double -> (Double,Double)
-conicalP_cyl_reg_e m lambda x = createSFR "conicalP_cyl_reg_e" $ gsl_sf_conicalP_cyl_reg_e m lambda x
-foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg_e" gsl_sf_conicalP_cyl_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_cyl_reg_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+conicalP_cyl_reg_e :: CInt -> Double -> Double -> Ptr Double -> CInt
+conicalP_cyl_reg_e = gsl_sf_conicalP_cyl_reg_e
+foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg_e" gsl_sf_conicalP_cyl_reg_e :: CInt -> Double -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_conicalP_cyl_reg(int m,double lambda,double x);
-conicalP_cyl_reg :: Int -> Double -> Double -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_conicalP_cyl_reg&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+conicalP_cyl_reg :: CInt -> Double -> Double -> Double
 conicalP_cyl_reg = gsl_sf_conicalP_cyl_reg
-foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg" gsl_sf_conicalP_cyl_reg :: Int -> Double -> Double -> Double
+foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg" gsl_sf_conicalP_cyl_reg :: CInt -> Double -> Double -> Double
 
--- | wrapper for int gsl_sf_legendre_H3d_0_e(double lambda,double eta,gsl_sf_result* result);
-legendre_H3d_0_e :: Double -> Double -> (Double,Double)
-legendre_H3d_0_e lambda eta = createSFR "legendre_H3d_0_e" $ gsl_sf_legendre_H3d_0_e lambda eta
-foreign import ccall "legendre.h gsl_sf_legendre_H3d_0_e" gsl_sf_legendre_H3d_0_e :: Double -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_H3d_0_e(double lambda,double eta,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_H3d_0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_H3d_0_e :: Double -> Double -> Ptr Double -> CInt
+legendre_H3d_0_e = gsl_sf_legendre_H3d_0_e
+foreign import ccall "legendre.h gsl_sf_legendre_H3d_0_e" gsl_sf_legendre_H3d_0_e :: Double -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_H3d_0(double lambda,double eta);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_H3d_0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 legendre_H3d_0 :: Double -> Double -> Double
 legendre_H3d_0 = gsl_sf_legendre_H3d_0
 foreign import ccall "legendre.h gsl_sf_legendre_H3d_0" gsl_sf_legendre_H3d_0 :: Double -> Double -> Double
 
--- | wrapper for int gsl_sf_legendre_H3d_1_e(double lambda,double eta,gsl_sf_result* result);
-legendre_H3d_1_e :: Double -> Double -> (Double,Double)
-legendre_H3d_1_e lambda eta = createSFR "legendre_H3d_1_e" $ gsl_sf_legendre_H3d_1_e lambda eta
-foreign import ccall "legendre.h gsl_sf_legendre_H3d_1_e" gsl_sf_legendre_H3d_1_e :: Double -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_H3d_1_e(double lambda,double eta,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_H3d_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_H3d_1_e :: Double -> Double -> Ptr Double -> CInt
+legendre_H3d_1_e = gsl_sf_legendre_H3d_1_e
+foreign import ccall "legendre.h gsl_sf_legendre_H3d_1_e" gsl_sf_legendre_H3d_1_e :: Double -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_H3d_1(double lambda,double eta);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_H3d_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 legendre_H3d_1 :: Double -> Double -> Double
 legendre_H3d_1 = gsl_sf_legendre_H3d_1
 foreign import ccall "legendre.h gsl_sf_legendre_H3d_1" gsl_sf_legendre_H3d_1 :: Double -> Double -> Double
 
--- | wrapper for int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,gsl_sf_result* result);
-legendre_H3d_e :: Int -> Double -> Double -> (Double,Double)
-legendre_H3d_e l lambda eta = createSFR "legendre_H3d_e" $ gsl_sf_legendre_H3d_e l lambda eta
-foreign import ccall "legendre.h gsl_sf_legendre_H3d_e" gsl_sf_legendre_H3d_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
+-- | wrapper for int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,double* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_H3d_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_H3d_e :: CInt -> Double -> Double -> Ptr Double -> CInt
+legendre_H3d_e = gsl_sf_legendre_H3d_e
+foreign import ccall "legendre.h gsl_sf_legendre_H3d_e" gsl_sf_legendre_H3d_e :: CInt -> Double -> Double -> Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_legendre_H3d(int l,double lambda,double eta);
-legendre_H3d :: Int -> Double -> Double -> Double
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_H3d&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_H3d :: CInt -> Double -> Double -> Double
 legendre_H3d = gsl_sf_legendre_H3d
-foreign import ccall "legendre.h gsl_sf_legendre_H3d" gsl_sf_legendre_H3d :: Int -> Double -> Double -> Double
+foreign import ccall "legendre.h gsl_sf_legendre_H3d" gsl_sf_legendre_H3d :: CInt -> Double -> Double -> Double
 
 -- | wrapper for int gsl_sf_legendre_H3d_array(int lmax,double lambda,double eta,double* result_array);
-legendre_H3d_array :: Int -> Double -> Double -> Ptr Double -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_legendre_H3d_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+legendre_H3d_array :: CInt -> Double -> Double -> Ptr Double -> CInt
 legendre_H3d_array = gsl_sf_legendre_H3d_array
-foreign import ccall "legendre.h gsl_sf_legendre_H3d_array" gsl_sf_legendre_H3d_array :: Int -> Double -> Double -> Ptr Double -> Int
+foreign import ccall "legendre.h gsl_sf_legendre_H3d_array" gsl_sf_legendre_H3d_array :: CInt -> Double -> Double -> Ptr Double -> CInt
diff --git a/lib/Numeric/GSL/Special/Log.hs b/lib/Numeric/GSL/Special/Log.hs
--- a/lib/Numeric/GSL/Special/Log.hs
+++ b/lib/Numeric/GSL/Special/Log.hs
@@ -9,7 +9,7 @@
 
 Wrappers for selected functions described at:
 
-<http://www.gnu.org/software/gsl/manual/html_node/Logarithm-and-Related-Functions.html>
+<http://www.google.com/search?q=gsl_sf_log.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 
 -}
 ------------------------------------------------------------
@@ -26,49 +26,68 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_log_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_log_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 log_e :: Double -> (Double,Double)
 log_e x = createSFR "log_e" $ gsl_sf_log_e x
-foreign import ccall "log.h gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "log.h gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_log(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_log&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 log :: Double -> Double
 log = gsl_sf_log
 foreign import ccall "log.h gsl_sf_log" gsl_sf_log :: Double -> Double
 
 -- | wrapper for int gsl_sf_log_abs_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_log_abs_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 log_abs_e :: Double -> (Double,Double)
 log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x
-foreign import ccall "log.h gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "log.h gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_log_abs(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_log_abs&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 log_abs :: Double -> Double
 log_abs = gsl_sf_log_abs
 foreign import ccall "log.h gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double
 
 -- | wrapper for int gsl_sf_complex_log_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* theta);
-complex_log_e :: Double -> Double -> Ptr Double -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_complex_log_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+complex_log_e :: Double -> Double -> Ptr () -> (Double,Double)
 complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr
-foreign import ccall "log.h gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "log.h gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_log_1plusx_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_log_1plusx_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 log_1plusx_e :: Double -> (Double,Double)
 log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x
-foreign import ccall "log.h gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "log.h gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_log_1plusx(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_log_1plusx&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 log_1plusx :: Double -> Double
 log_1plusx = gsl_sf_log_1plusx
 foreign import ccall "log.h gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double
 
 -- | wrapper for int gsl_sf_log_1plusx_mx_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_log_1plusx_mx_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 log_1plusx_mx_e :: Double -> (Double,Double)
 log_1plusx_mx_e x = createSFR "log_1plusx_mx_e" $ gsl_sf_log_1plusx_mx_e x
-foreign import ccall "log.h gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "log.h gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_log_1plusx_mx(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_log_1plusx_mx&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 log_1plusx_mx :: Double -> Double
 log_1plusx_mx = gsl_sf_log_1plusx_mx
 foreign import ccall "log.h gsl_sf_log_1plusx_mx" gsl_sf_log_1plusx_mx :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Pow_int.hs b/lib/Numeric/GSL/Special/Pow_int.hs
--- a/lib/Numeric/GSL/Special/Pow_int.hs
+++ b/lib/Numeric/GSL/Special/Pow_int.hs
@@ -20,18 +20,19 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_pow_int_e(double x,int n,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_pow_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-pow_int_e :: Double -> Int -> (Double,Double)
+pow_int_e :: Double -> CInt -> (Double,Double)
 pow_int_e x n = createSFR "pow_int_e" $ gsl_sf_pow_int_e x n
-foreign import ccall "pow_int.h gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> Int -> Ptr Double -> IO(Int)
+foreign import ccall "pow_int.h gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_pow_int(double x,int n);
 --
 --   <http://www.google.com/search?q=gsl_sf_pow_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-pow_int :: Double -> Int -> Double
+pow_int :: Double -> CInt -> Double
 pow_int = gsl_sf_pow_int
-foreign import ccall "pow_int.h gsl_sf_pow_int" gsl_sf_pow_int :: Double -> Int -> Double
+foreign import ccall "pow_int.h gsl_sf_pow_int" gsl_sf_pow_int :: Double -> CInt -> Double
diff --git a/lib/Numeric/GSL/Special/Psi.hs b/lib/Numeric/GSL/Special/Psi.hs
--- a/lib/Numeric/GSL/Special/Psi.hs
+++ b/lib/Numeric/GSL/Special/Psi.hs
@@ -30,28 +30,29 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_psi_int_e(int n,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_psi_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-psi_int_e :: Int -> (Double,Double)
+psi_int_e :: CInt -> (Double,Double)
 psi_int_e n = createSFR "psi_int_e" $ gsl_sf_psi_int_e n
-foreign import ccall "psi.h gsl_sf_psi_int_e" gsl_sf_psi_int_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "psi.h gsl_sf_psi_int_e" gsl_sf_psi_int_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_psi_int(int n);
 --
 --   <http://www.google.com/search?q=gsl_sf_psi_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-psi_int :: Int -> Double
+psi_int :: CInt -> Double
 psi_int = gsl_sf_psi_int
-foreign import ccall "psi.h gsl_sf_psi_int" gsl_sf_psi_int :: Int -> Double
+foreign import ccall "psi.h gsl_sf_psi_int" gsl_sf_psi_int :: CInt -> Double
 
 -- | wrapper for int gsl_sf_psi_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_psi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 psi_e :: Double -> (Double,Double)
 psi_e x = createSFR "psi_e" $ gsl_sf_psi_e x
-foreign import ccall "psi.h gsl_sf_psi_e" gsl_sf_psi_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "psi.h gsl_sf_psi_e" gsl_sf_psi_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_psi(double x);
 --
@@ -65,7 +66,7 @@
 --   <http://www.google.com/search?q=gsl_sf_psi_1piy_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 psi_1piy_e :: Double -> (Double,Double)
 psi_1piy_e y = createSFR "psi_1piy_e" $ gsl_sf_psi_1piy_e y
-foreign import ccall "psi.h gsl_sf_psi_1piy_e" gsl_sf_psi_1piy_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "psi.h gsl_sf_psi_1piy_e" gsl_sf_psi_1piy_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_psi_1piy(double y);
 --
@@ -74,26 +75,33 @@
 psi_1piy = gsl_sf_psi_1piy
 foreign import ccall "psi.h gsl_sf_psi_1piy" gsl_sf_psi_1piy :: Double -> Double
 
+-- | wrapper for int gsl_sf_complex_psi_e(double x,double y,gsl_sf_result* result_re,gsl_sf_result* result_im);
+--
+--   <http://www.google.com/search?q=gsl_sf_complex_psi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+complex_psi_e :: Double -> Double -> Ptr () -> (Double,Double)
+complex_psi_e x y result_re = createSFR "complex_psi_e" $ gsl_sf_complex_psi_e x y result_re
+foreign import ccall "psi.h gsl_sf_complex_psi_e" gsl_sf_complex_psi_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
+
 -- | wrapper for int gsl_sf_psi_1_int_e(int n,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_psi_1_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-psi_1_int_e :: Int -> (Double,Double)
+psi_1_int_e :: CInt -> (Double,Double)
 psi_1_int_e n = createSFR "psi_1_int_e" $ gsl_sf_psi_1_int_e n
-foreign import ccall "psi.h gsl_sf_psi_1_int_e" gsl_sf_psi_1_int_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "psi.h gsl_sf_psi_1_int_e" gsl_sf_psi_1_int_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_psi_1_int(int n);
 --
 --   <http://www.google.com/search?q=gsl_sf_psi_1_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-psi_1_int :: Int -> Double
+psi_1_int :: CInt -> Double
 psi_1_int = gsl_sf_psi_1_int
-foreign import ccall "psi.h gsl_sf_psi_1_int" gsl_sf_psi_1_int :: Int -> Double
+foreign import ccall "psi.h gsl_sf_psi_1_int" gsl_sf_psi_1_int :: CInt -> Double
 
 -- | wrapper for int gsl_sf_psi_1_e(double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_psi_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 psi_1_e :: Double -> (Double,Double)
 psi_1_e x = createSFR "psi_1_e" $ gsl_sf_psi_1_e x
-foreign import ccall "psi.h gsl_sf_psi_1_e" gsl_sf_psi_1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "psi.h gsl_sf_psi_1_e" gsl_sf_psi_1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_psi_1(double x);
 --
@@ -105,13 +113,13 @@
 -- | wrapper for int gsl_sf_psi_n_e(int n,double x,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_psi_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-psi_n_e :: Int -> Double -> (Double,Double)
+psi_n_e :: CInt -> Double -> (Double,Double)
 psi_n_e n x = createSFR "psi_n_e" $ gsl_sf_psi_n_e n x
-foreign import ccall "psi.h gsl_sf_psi_n_e" gsl_sf_psi_n_e :: Int -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "psi.h gsl_sf_psi_n_e" gsl_sf_psi_n_e :: CInt -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_psi_n(int n,double x);
 --
 --   <http://www.google.com/search?q=gsl_sf_psi_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-psi_n :: Int -> Double -> Double
+psi_n :: CInt -> Double -> Double
 psi_n = gsl_sf_psi_n
-foreign import ccall "psi.h gsl_sf_psi_n" gsl_sf_psi_n :: Int -> Double -> Double
+foreign import ccall "psi.h gsl_sf_psi_n" gsl_sf_psi_n :: CInt -> Double -> Double
diff --git a/lib/Numeric/GSL/Special/Synchrotron.hs b/lib/Numeric/GSL/Special/Synchrotron.hs
--- a/lib/Numeric/GSL/Special/Synchrotron.hs
+++ b/lib/Numeric/GSL/Special/Synchrotron.hs
@@ -22,6 +22,7 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_synchrotron_1_e(double x,gsl_sf_result* result);
@@ -29,7 +30,7 @@
 --   <http://www.google.com/search?q=gsl_sf_synchrotron_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 synchrotron_1_e :: Double -> (Double,Double)
 synchrotron_1_e x = createSFR "synchrotron_1_e" $ gsl_sf_synchrotron_1_e x
-foreign import ccall "synchrotron.h gsl_sf_synchrotron_1_e" gsl_sf_synchrotron_1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "synchrotron.h gsl_sf_synchrotron_1_e" gsl_sf_synchrotron_1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_synchrotron_1(double x);
 --
@@ -43,7 +44,7 @@
 --   <http://www.google.com/search?q=gsl_sf_synchrotron_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 synchrotron_2_e :: Double -> (Double,Double)
 synchrotron_2_e x = createSFR "synchrotron_2_e" $ gsl_sf_synchrotron_2_e x
-foreign import ccall "synchrotron.h gsl_sf_synchrotron_2_e" gsl_sf_synchrotron_2_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "synchrotron.h gsl_sf_synchrotron_2_e" gsl_sf_synchrotron_2_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_synchrotron_2(double x);
 --
diff --git a/lib/Numeric/GSL/Special/Trig.hs b/lib/Numeric/GSL/Special/Trig.hs
--- a/lib/Numeric/GSL/Special/Trig.hs
+++ b/lib/Numeric/GSL/Special/Trig.hs
@@ -9,7 +9,7 @@
 
 Wrappers for selected functions described at:
 
-<http://www.gnu.org/software/gsl/manual/html_node/Trigonometric-Functions.html>
+<http://www.google.com/search?q=gsl_sf_trig.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 
 -}
 ------------------------------------------------------------
@@ -36,129 +36,180 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_sin_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_sin_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 sin_e :: Double -> (Double,Double)
 sin_e x = createSFR "sin_e" $ gsl_sf_sin_e x
-foreign import ccall "trig.h gsl_sf_sin_e" gsl_sf_sin_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_sin_e" gsl_sf_sin_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_sin(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_sin&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 sin :: Double -> Double
 sin = gsl_sf_sin
 foreign import ccall "trig.h gsl_sf_sin" gsl_sf_sin :: Double -> Double
 
 -- | wrapper for int gsl_sf_cos_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_cos_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 cos_e :: Double -> (Double,Double)
 cos_e x = createSFR "cos_e" $ gsl_sf_cos_e x
-foreign import ccall "trig.h gsl_sf_cos_e" gsl_sf_cos_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_cos_e" gsl_sf_cos_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_cos(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_cos&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 cos :: Double -> Double
 cos = gsl_sf_cos
 foreign import ccall "trig.h gsl_sf_cos" gsl_sf_cos :: Double -> Double
 
 -- | wrapper for int gsl_sf_hypot_e(double x,double y,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_hypot_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hypot_e :: Double -> Double -> (Double,Double)
 hypot_e x y = createSFR "hypot_e" $ gsl_sf_hypot_e x y
-foreign import ccall "trig.h gsl_sf_hypot_e" gsl_sf_hypot_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_hypot_e" gsl_sf_hypot_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hypot(double x,double y);
+--
+--   <http://www.google.com/search?q=gsl_sf_hypot&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hypot :: Double -> Double -> Double
 hypot = gsl_sf_hypot
 foreign import ccall "trig.h gsl_sf_hypot" gsl_sf_hypot :: Double -> Double -> Double
 
 -- | wrapper for int gsl_sf_complex_sin_e(double zr,double zi,gsl_sf_result* szr,gsl_sf_result* szi);
-complex_sin_e :: Double -> Double -> Ptr Double -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_complex_sin_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+complex_sin_e :: Double -> Double -> Ptr () -> (Double,Double)
 complex_sin_e zr zi szr = createSFR "complex_sin_e" $ gsl_sf_complex_sin_e zr zi szr
-foreign import ccall "trig.h gsl_sf_complex_sin_e" gsl_sf_complex_sin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_complex_sin_e" gsl_sf_complex_sin_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_complex_cos_e(double zr,double zi,gsl_sf_result* czr,gsl_sf_result* czi);
-complex_cos_e :: Double -> Double -> Ptr Double -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_complex_cos_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+complex_cos_e :: Double -> Double -> Ptr () -> (Double,Double)
 complex_cos_e zr zi czr = createSFR "complex_cos_e" $ gsl_sf_complex_cos_e zr zi czr
-foreign import ccall "trig.h gsl_sf_complex_cos_e" gsl_sf_complex_cos_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_complex_cos_e" gsl_sf_complex_cos_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_complex_logsin_e(double zr,double zi,gsl_sf_result* lszr,gsl_sf_result* lszi);
-complex_logsin_e :: Double -> Double -> Ptr Double -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_complex_logsin_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+complex_logsin_e :: Double -> Double -> Ptr () -> (Double,Double)
 complex_logsin_e zr zi lszr = createSFR "complex_logsin_e" $ gsl_sf_complex_logsin_e zr zi lszr
-foreign import ccall "trig.h gsl_sf_complex_logsin_e" gsl_sf_complex_logsin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_complex_logsin_e" gsl_sf_complex_logsin_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_sinc_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_sinc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 sinc_e :: Double -> (Double,Double)
 sinc_e x = createSFR "sinc_e" $ gsl_sf_sinc_e x
-foreign import ccall "trig.h gsl_sf_sinc_e" gsl_sf_sinc_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_sinc_e" gsl_sf_sinc_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_sinc(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_sinc&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 sinc :: Double -> Double
 sinc = gsl_sf_sinc
 foreign import ccall "trig.h gsl_sf_sinc" gsl_sf_sinc :: Double -> Double
 
 -- | wrapper for int gsl_sf_lnsinh_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_lnsinh_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 lnsinh_e :: Double -> (Double,Double)
 lnsinh_e x = createSFR "lnsinh_e" $ gsl_sf_lnsinh_e x
-foreign import ccall "trig.h gsl_sf_lnsinh_e" gsl_sf_lnsinh_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_lnsinh_e" gsl_sf_lnsinh_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lnsinh(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_lnsinh&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 lnsinh :: Double -> Double
 lnsinh = gsl_sf_lnsinh
 foreign import ccall "trig.h gsl_sf_lnsinh" gsl_sf_lnsinh :: Double -> Double
 
 -- | wrapper for int gsl_sf_lncosh_e(double x,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_lncosh_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 lncosh_e :: Double -> (Double,Double)
 lncosh_e x = createSFR "lncosh_e" $ gsl_sf_lncosh_e x
-foreign import ccall "trig.h gsl_sf_lncosh_e" gsl_sf_lncosh_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_lncosh_e" gsl_sf_lncosh_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_lncosh(double x);
+--
+--   <http://www.google.com/search?q=gsl_sf_lncosh&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 lncosh :: Double -> Double
 lncosh = gsl_sf_lncosh
 foreign import ccall "trig.h gsl_sf_lncosh" gsl_sf_lncosh :: Double -> Double
 
 -- | wrapper for int gsl_sf_polar_to_rect(double r,double theta,gsl_sf_result* x,gsl_sf_result* y);
-polar_to_rect :: Double -> Double -> Ptr Double -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_polar_to_rect&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+polar_to_rect :: Double -> Double -> Ptr () -> (Double,Double)
 polar_to_rect r theta x = createSFR "polar_to_rect" $ gsl_sf_polar_to_rect r theta x
-foreign import ccall "trig.h gsl_sf_polar_to_rect" gsl_sf_polar_to_rect :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_polar_to_rect" gsl_sf_polar_to_rect :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_rect_to_polar(double x,double y,gsl_sf_result* r,gsl_sf_result* theta);
-rect_to_polar :: Double -> Double -> Ptr Double -> (Double,Double)
+--
+--   <http://www.google.com/search?q=gsl_sf_rect_to_polar&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+rect_to_polar :: Double -> Double -> Ptr () -> (Double,Double)
 rect_to_polar x y r = createSFR "rect_to_polar" $ gsl_sf_rect_to_polar x y r
-foreign import ccall "trig.h gsl_sf_rect_to_polar" gsl_sf_rect_to_polar :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_rect_to_polar" gsl_sf_rect_to_polar :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_sin_err_e(double x,double dx,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_sin_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 sin_err_e :: Double -> Double -> (Double,Double)
 sin_err_e x dx = createSFR "sin_err_e" $ gsl_sf_sin_err_e x dx
-foreign import ccall "trig.h gsl_sf_sin_err_e" gsl_sf_sin_err_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_sin_err_e" gsl_sf_sin_err_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_cos_err_e(double x,double dx,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_cos_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 cos_err_e :: Double -> Double -> (Double,Double)
 cos_err_e x dx = createSFR "cos_err_e" $ gsl_sf_cos_err_e x dx
-foreign import ccall "trig.h gsl_sf_cos_err_e" gsl_sf_cos_err_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_cos_err_e" gsl_sf_cos_err_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_angle_restrict_symm_e(double* theta);
-angle_restrict_symm_e :: Ptr Double -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_angle_restrict_symm_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+angle_restrict_symm_e :: Ptr Double -> CInt
 angle_restrict_symm_e = gsl_sf_angle_restrict_symm_e
-foreign import ccall "trig.h gsl_sf_angle_restrict_symm_e" gsl_sf_angle_restrict_symm_e :: Ptr Double -> Int
+foreign import ccall "trig.h gsl_sf_angle_restrict_symm_e" gsl_sf_angle_restrict_symm_e :: Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_angle_restrict_symm(double theta);
+--
+--   <http://www.google.com/search?q=gsl_sf_angle_restrict_symm&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 angle_restrict_symm :: Double -> Double
 angle_restrict_symm = gsl_sf_angle_restrict_symm
 foreign import ccall "trig.h gsl_sf_angle_restrict_symm" gsl_sf_angle_restrict_symm :: Double -> Double
 
 -- | wrapper for int gsl_sf_angle_restrict_pos_e(double* theta);
-angle_restrict_pos_e :: Ptr Double -> Int
+--
+--   <http://www.google.com/search?q=gsl_sf_angle_restrict_pos_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
+angle_restrict_pos_e :: Ptr Double -> CInt
 angle_restrict_pos_e = gsl_sf_angle_restrict_pos_e
-foreign import ccall "trig.h gsl_sf_angle_restrict_pos_e" gsl_sf_angle_restrict_pos_e :: Ptr Double -> Int
+foreign import ccall "trig.h gsl_sf_angle_restrict_pos_e" gsl_sf_angle_restrict_pos_e :: Ptr Double -> CInt
 
 -- | wrapper for double gsl_sf_angle_restrict_pos(double theta);
+--
+--   <http://www.google.com/search?q=gsl_sf_angle_restrict_pos&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 angle_restrict_pos :: Double -> Double
 angle_restrict_pos = gsl_sf_angle_restrict_pos
 foreign import ccall "trig.h gsl_sf_angle_restrict_pos" gsl_sf_angle_restrict_pos :: Double -> Double
 
 -- | wrapper for int gsl_sf_angle_restrict_symm_err_e(double theta,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_angle_restrict_symm_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 angle_restrict_symm_err_e :: Double -> (Double,Double)
 angle_restrict_symm_err_e theta = createSFR "angle_restrict_symm_err_e" $ gsl_sf_angle_restrict_symm_err_e theta
-foreign import ccall "trig.h gsl_sf_angle_restrict_symm_err_e" gsl_sf_angle_restrict_symm_err_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_angle_restrict_symm_err_e" gsl_sf_angle_restrict_symm_err_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for int gsl_sf_angle_restrict_pos_err_e(double theta,gsl_sf_result* result);
+--
+--   <http://www.google.com/search?q=gsl_sf_angle_restrict_pos_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 angle_restrict_pos_err_e :: Double -> (Double,Double)
 angle_restrict_pos_err_e theta = createSFR "angle_restrict_pos_err_e" $ gsl_sf_angle_restrict_pos_err_e theta
-foreign import ccall "trig.h gsl_sf_angle_restrict_pos_err_e" gsl_sf_angle_restrict_pos_err_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "trig.h gsl_sf_angle_restrict_pos_err_e" gsl_sf_angle_restrict_pos_err_e :: Double -> Ptr () -> IO CInt
diff --git a/lib/Numeric/GSL/Special/Zeta.hs b/lib/Numeric/GSL/Special/Zeta.hs
--- a/lib/Numeric/GSL/Special/Zeta.hs
+++ b/lib/Numeric/GSL/Special/Zeta.hs
@@ -32,28 +32,29 @@
 ) where
 
 import Foreign(Ptr)
+import Foreign.C.Types(CInt)
 import Numeric.GSL.Special.Internal
 
 -- | wrapper for int gsl_sf_zeta_int_e(int n,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_zeta_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-zeta_int_e :: Int -> (Double,Double)
+zeta_int_e :: CInt -> (Double,Double)
 zeta_int_e n = createSFR "zeta_int_e" $ gsl_sf_zeta_int_e n
-foreign import ccall "zeta.h gsl_sf_zeta_int_e" gsl_sf_zeta_int_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "zeta.h gsl_sf_zeta_int_e" gsl_sf_zeta_int_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_zeta_int(int n);
 --
 --   <http://www.google.com/search?q=gsl_sf_zeta_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-zeta_int :: Int -> Double
+zeta_int :: CInt -> Double
 zeta_int = gsl_sf_zeta_int
-foreign import ccall "zeta.h gsl_sf_zeta_int" gsl_sf_zeta_int :: Int -> Double
+foreign import ccall "zeta.h gsl_sf_zeta_int" gsl_sf_zeta_int :: CInt -> Double
 
 -- | wrapper for int gsl_sf_zeta_e(double s,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_zeta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 zeta_e :: Double -> (Double,Double)
 zeta_e s = createSFR "zeta_e" $ gsl_sf_zeta_e s
-foreign import ccall "zeta.h gsl_sf_zeta_e" gsl_sf_zeta_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "zeta.h gsl_sf_zeta_e" gsl_sf_zeta_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_zeta(double s);
 --
@@ -67,7 +68,7 @@
 --   <http://www.google.com/search?q=gsl_sf_zetam1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 zetam1_e :: Double -> (Double,Double)
 zetam1_e s = createSFR "zetam1_e" $ gsl_sf_zetam1_e s
-foreign import ccall "zeta.h gsl_sf_zetam1_e" gsl_sf_zetam1_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "zeta.h gsl_sf_zetam1_e" gsl_sf_zetam1_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_zetam1(double s);
 --
@@ -79,23 +80,23 @@
 -- | wrapper for int gsl_sf_zetam1_int_e(int s,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_zetam1_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-zetam1_int_e :: Int -> (Double,Double)
+zetam1_int_e :: CInt -> (Double,Double)
 zetam1_int_e s = createSFR "zetam1_int_e" $ gsl_sf_zetam1_int_e s
-foreign import ccall "zeta.h gsl_sf_zetam1_int_e" gsl_sf_zetam1_int_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "zeta.h gsl_sf_zetam1_int_e" gsl_sf_zetam1_int_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_zetam1_int(int s);
 --
 --   <http://www.google.com/search?q=gsl_sf_zetam1_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-zetam1_int :: Int -> Double
+zetam1_int :: CInt -> Double
 zetam1_int = gsl_sf_zetam1_int
-foreign import ccall "zeta.h gsl_sf_zetam1_int" gsl_sf_zetam1_int :: Int -> Double
+foreign import ccall "zeta.h gsl_sf_zetam1_int" gsl_sf_zetam1_int :: CInt -> Double
 
 -- | wrapper for int gsl_sf_hzeta_e(double s,double q,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_hzeta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 hzeta_e :: Double -> Double -> (Double,Double)
 hzeta_e s q = createSFR "hzeta_e" $ gsl_sf_hzeta_e s q
-foreign import ccall "zeta.h gsl_sf_hzeta_e" gsl_sf_hzeta_e :: Double -> Double -> Ptr Double -> IO(Int)
+foreign import ccall "zeta.h gsl_sf_hzeta_e" gsl_sf_hzeta_e :: Double -> Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_hzeta(double s,double q);
 --
@@ -107,23 +108,23 @@
 -- | wrapper for int gsl_sf_eta_int_e(int n,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_eta_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-eta_int_e :: Int -> (Double,Double)
+eta_int_e :: CInt -> (Double,Double)
 eta_int_e n = createSFR "eta_int_e" $ gsl_sf_eta_int_e n
-foreign import ccall "zeta.h gsl_sf_eta_int_e" gsl_sf_eta_int_e :: Int -> Ptr Double -> IO(Int)
+foreign import ccall "zeta.h gsl_sf_eta_int_e" gsl_sf_eta_int_e :: CInt -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_eta_int(int n);
 --
 --   <http://www.google.com/search?q=gsl_sf_eta_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
-eta_int :: Int -> Double
+eta_int :: CInt -> Double
 eta_int = gsl_sf_eta_int
-foreign import ccall "zeta.h gsl_sf_eta_int" gsl_sf_eta_int :: Int -> Double
+foreign import ccall "zeta.h gsl_sf_eta_int" gsl_sf_eta_int :: CInt -> Double
 
 -- | wrapper for int gsl_sf_eta_e(double s,gsl_sf_result* result);
 --
 --   <http://www.google.com/search?q=gsl_sf_eta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
 eta_e :: Double -> (Double,Double)
 eta_e s = createSFR "eta_e" $ gsl_sf_eta_e s
-foreign import ccall "zeta.h gsl_sf_eta_e" gsl_sf_eta_e :: Double -> Ptr Double -> IO(Int)
+foreign import ccall "zeta.h gsl_sf_eta_e" gsl_sf_eta_e :: Double -> Ptr () -> IO CInt
 
 -- | wrapper for double gsl_sf_eta(double s);
 --
diff --git a/lib/Numeric/GSL/Special/auto.hs b/lib/Numeric/GSL/Special/auto.hs
--- a/lib/Numeric/GSL/Special/auto.hs
+++ b/lib/Numeric/GSL/Special/auto.hs
@@ -60,7 +60,9 @@
     --mapM_ (putStrLn.showFull (name ++".h")) parsed
     let exports = rep (")",") where") $ rep ("(\n","(\n  ") $ rep (",\n",", ") $ unlines $ ["("]++intersperse "," (map (\(Header _ n _) -> hName n) (filter safe parsed))++[")"]
     let defs = unlines $ map (showFull (name ++".h")) parsed
-    let imports = "\nimport Foreign(Ptr)\nimport Numeric.GSL.Special.Internal\n"
+    let imports = "\nimport Foreign(Ptr)\n"
+                ++"import Foreign.C.Types(CInt)\n"
+                ++"import Numeric.GSL.Special.Internal\n"
     let mod = modhead name ++ "module Numeric.GSL.Special."++ upperFirst name++exports++imports++defs
     writeFile (upperFirst name ++ ".hs") mod
 
@@ -178,12 +180,15 @@
 
 showH hc h@(Header t n args) = "foreign import ccall \""++hc++" "++n++"\" "++n++" :: "++ (concat$intersperse" -> "$map showHa args) ++" -> " ++ t'
     where t' | pure h = showHt t
-             | otherwise = "IO("++showHt t++")"
+             | otherwise = "IO "++showHt t
 
-showHt (Normal (s:ss)) = toUpper s : ss
-showHt (Pointer "gsl_sf_result") = "Ptr Double"
+ht "int" = "CInt"
+ht (s:ss) = toUpper s : ss
+
+showHt (Normal t) = ht t
+showHt (Pointer "gsl_sf_result") = "Ptr ()"
 showHt (Pointer "gsl_sf_result_e10") = "Ptr ()"
-showHt (Pointer (s:ss)) = "Ptr "++toUpper s : ss
+showHt (Pointer t) = "Ptr "++ht t
 
 showHa (t,a) = showHt t
 
diff --git a/lib/Numeric/GSL/Special/autoall.sh b/lib/Numeric/GSL/Special/autoall.sh
--- a/lib/Numeric/GSL/Special/autoall.sh
+++ b/lib/Numeric/GSL/Special/autoall.sh
@@ -32,7 +32,7 @@
 runhaskell auto hyperg
 runhaskell auto laguerre
 runhaskell auto lambert
-#runhaskell auto legendre
+#runhaskell auto legendre legendre.h
 #runhaskell auto log
 runhaskell auto pow_int
 runhaskell auto psi
diff --git a/lib/Numeric/GSL/Special/debye.h b/lib/Numeric/GSL/Special/debye.h
--- a/lib/Numeric/GSL/Special/debye.h
+++ b/lib/Numeric/GSL/Special/debye.h
@@ -6,3 +6,7 @@
 double gsl_sf_debye_3(double x);
 int gsl_sf_debye_4_e(double x,double* result);
 double gsl_sf_debye_4(double x);
+int gsl_sf_debye_5_e(double x,double* result);
+double gsl_sf_debye_5(double x);
+int gsl_sf_debye_6_e(double x,double* result);
+double gsl_sf_debye_6(double x);
diff --git a/lib/Numeric/GSL/Special/ellint.h b/lib/Numeric/GSL/Special/ellint.h
--- a/lib/Numeric/GSL/Special/ellint.h
+++ b/lib/Numeric/GSL/Special/ellint.h
@@ -2,6 +2,10 @@
 double gsl_sf_ellint_Kcomp(double k,int mode);
 int gsl_sf_ellint_Ecomp_e(double k,int mode,double* result);
 double gsl_sf_ellint_Ecomp(double k,int mode);
+int gsl_sf_ellint_Pcomp_e(double k,double n,int mode,double* result);
+double gsl_sf_ellint_Pcomp(double k,double n,int mode);
+int gsl_sf_ellint_Dcomp_e(double k,int mode,double* result);
+double gsl_sf_ellint_Dcomp(double k,int mode);
 int gsl_sf_ellint_F_e(double phi,double k,int mode,double* result);
 double gsl_sf_ellint_F(double phi,double k,int mode);
 int gsl_sf_ellint_E_e(double phi,double k,int mode,double* result);
diff --git a/lib/Numeric/GSL/Special/gamma.h b/lib/Numeric/GSL/Special/gamma.h
--- a/lib/Numeric/GSL/Special/gamma.h
+++ b/lib/Numeric/GSL/Special/gamma.h
@@ -37,6 +37,7 @@
 double gsl_sf_gamma_inc(double a,double x);
 int gsl_sf_lnbeta_e(double a,double b,double* result);
 double gsl_sf_lnbeta(double a,double b);
+int gsl_sf_lnbeta_sgn_e(double x,double y,double* result,double* sgn);
 int gsl_sf_beta_e(double a,double b,double* result);
 double gsl_sf_beta(double a,double b);
 int gsl_sf_beta_inc_e(double a,double b,double x,double* result);
diff --git a/lib/Numeric/GSL/Special/psi.h b/lib/Numeric/GSL/Special/psi.h
--- a/lib/Numeric/GSL/Special/psi.h
+++ b/lib/Numeric/GSL/Special/psi.h
@@ -4,6 +4,7 @@
 double gsl_sf_psi(double x);
 int gsl_sf_psi_1piy_e(double y,double* result);
 double gsl_sf_psi_1piy(double y);
+int gsl_sf_complex_psi_e(double x,double y,double* result_re,double* result_im);
 int gsl_sf_psi_1_int_e(int n,double* result);
 double gsl_sf_psi_1_int(int n);
 int gsl_sf_psi_1_e(double x,double* result);
diff --git a/lib/Numeric/GSL/Vector.hs b/lib/Numeric/GSL/Vector.hs
--- a/lib/Numeric/GSL/Vector.hs
+++ b/lib/Numeric/GSL/Vector.hs
@@ -25,7 +25,10 @@
 
 import Complex
 import Foreign
+import Foreign.C.Types(CInt)
 
+fromei x = fromIntegral (fromEnum x)
+
 data FunCodeV = Sin
               | Cos
               | Tan
@@ -73,33 +76,33 @@
 
 toScalarAux fun code v = unsafePerformIO $ do
     r <- createVector 1
-    app2 (fun (fromEnum code)) vec v vec r "toScalarAux"
+    app2 (fun (fromei code)) vec v vec r "toScalarAux"
     return (r `at` 0)
 
 vectorMapAux fun code v = unsafePerformIO $ do
     r <- createVector (dim v)
-    app2 (fun (fromEnum code)) vec v vec r "vectorMapAux"
+    app2 (fun (fromei code)) vec v vec r "vectorMapAux"
     return r
 
 vectorMapValAux fun code val v = unsafePerformIO $ do
     r <- createVector (dim v)
     pval <- newArray [val]
-    app2 (fun (fromEnum code) pval) vec v vec r "vectorMapValAux"
+    app2 (fun (fromei code) pval) vec v vec r "vectorMapValAux"
     free pval
     return r
 
 vectorZipAux fun code u v = unsafePerformIO $ do
     r <- createVector (dim u)
-    app3 (fun (fromEnum code)) vec u vec v vec r "vectorZipAux"
+    app3 (fun (fromei code)) vec u vec v vec r "vectorZipAux"
     return r
 
 ---------------------------------------------------------------------
 
 -- | obtains different functions of a vector: norm1, norm2, max, min, posmax, posmin, etc.
 toScalarR :: FunCodeS -> Vector Double -> Double
-toScalarR oper =  toScalarAux c_toScalarR (fromEnum oper)
+toScalarR oper =  toScalarAux c_toScalarR (fromei oper)
 
-foreign import ccall safe "gsl-aux.h toScalarR" c_toScalarR :: Int -> TVV
+foreign import ccall safe "gsl-aux.h toScalarR" c_toScalarR :: CInt -> TVV
 
 ------------------------------------------------------------------
 
@@ -107,27 +110,27 @@
 vectorMapR :: FunCodeV -> Vector Double -> Vector Double
 vectorMapR = vectorMapAux c_vectorMapR
 
-foreign import ccall safe "gsl-aux.h mapR" c_vectorMapR :: Int -> TVV
+foreign import ccall safe "gsl-aux.h mapR" c_vectorMapR :: CInt -> TVV
 
 -- | map of complex vectors with given function
 vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double)
-vectorMapC oper = vectorMapAux c_vectorMapC (fromEnum oper)
+vectorMapC oper = vectorMapAux c_vectorMapC (fromei oper)
 
-foreign import ccall safe "gsl-aux.h mapC" c_vectorMapC :: Int -> TCVCV
+foreign import ccall safe "gsl-aux.h mapC" c_vectorMapC :: CInt -> TCVCV
 
 -------------------------------------------------------------------
 
 -- | map of real vectors with given function
 vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double
-vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromEnum oper)
+vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromei oper)
 
-foreign import ccall safe "gsl-aux.h mapValR" c_vectorMapValR :: Int -> Ptr Double -> TVV
+foreign import ccall safe "gsl-aux.h mapValR" c_vectorMapValR :: CInt -> Ptr Double -> TVV
 
 -- | map of complex vectors with given function
 vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double)
 vectorMapValC = vectorMapValAux c_vectorMapValC
 
-foreign import ccall safe "gsl-aux.h mapValC" c_vectorMapValC :: Int -> Ptr (Complex Double) -> TCVCV
+foreign import ccall safe "gsl-aux.h mapValC" c_vectorMapValC :: CInt -> Ptr (Complex Double) -> TCVCV
 
 -------------------------------------------------------------------
 
@@ -135,10 +138,10 @@
 vectorZipR :: FunCodeVV -> Vector Double -> Vector Double -> Vector Double
 vectorZipR = vectorZipAux c_vectorZipR
 
-foreign import ccall safe "gsl-aux.h zipR" c_vectorZipR :: Int -> TVVV
+foreign import ccall safe "gsl-aux.h zipR" c_vectorZipR :: CInt -> TVVV
 
 -- | elementwise operation on complex vectors
 vectorZipC :: FunCodeVV -> Vector (Complex Double) -> Vector (Complex Double) -> Vector (Complex Double)
 vectorZipC = vectorZipAux c_vectorZipC
 
-foreign import ccall safe "gsl-aux.h zipC" c_vectorZipC :: Int -> TCVCVCV
+foreign import ccall safe "gsl-aux.h zipC" c_vectorZipC :: CInt -> TCVCVCV
diff --git a/lib/Numeric/GSL/gsl-aux.h b/lib/Numeric/GSL/gsl-aux.h
--- a/lib/Numeric/GSL/gsl-aux.h
+++ b/lib/Numeric/GSL/gsl-aux.h
@@ -50,7 +50,7 @@
 int integrate_qng(double f(double, void*), double a, double b, double prec,
                    double *result, double*error);
 
-int integrate_qags(double f(double,void*), double a, double b, double prec, int w, 
+int integrate_qags(double f(double,void*), double a, double b, double prec, int w,
                double *result, double* error);
 
 int polySolve(KRVEC(a), CVEC(z));
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/f2c.h b/lib/Numeric/LinearAlgebra/LAPACK/f2c.h
deleted file mode 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/f2c.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/* f2c.h  --  Standard Fortran to C header file */
-
-/**  barf  [ba:rf]  2.  "He suggested using FORTRAN, and everybody barfed."
-
-	- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
-
-#ifndef F2C_INCLUDE
-#define F2C_INCLUDE
-
-typedef long int integer;
-typedef unsigned long int uinteger;
-typedef char *address;
-typedef short int shortint;
-typedef float real;
-typedef double doublereal;
-typedef struct { real r, i; } complex;
-typedef struct { doublereal r, i; } doublecomplex;
-typedef long int logical;
-typedef short int shortlogical;
-typedef char logical1;
-typedef char integer1;
-#ifdef INTEGER_STAR_8	/* Adjust for integer*8. */
-typedef long long longint;		/* system-dependent */
-typedef unsigned long long ulongint;	/* system-dependent */
-#define qbit_clear(a,b)	((a) & ~((ulongint)1 << (b)))
-#define qbit_set(a,b)	((a) |  ((ulongint)1 << (b)))
-#endif
-
-#define TRUE_ (1)
-#define FALSE_ (0)
-
-/* Extern is for use with -E */
-#ifndef Extern
-#define Extern extern
-#endif
-
-/* I/O stuff */
-
-#ifdef f2c_i2
-/* for -i2 */
-typedef short flag;
-typedef short ftnlen;
-typedef short ftnint;
-#else
-typedef long int flag;
-typedef long int ftnlen;
-typedef long int ftnint;
-#endif
-
-/*external read, write*/
-typedef struct
-{	flag cierr;
-	ftnint ciunit;
-	flag ciend;
-	char *cifmt;
-	ftnint cirec;
-} cilist;
-
-/*internal read, write*/
-typedef struct
-{	flag icierr;
-	char *iciunit;
-	flag iciend;
-	char *icifmt;
-	ftnint icirlen;
-	ftnint icirnum;
-} icilist;
-
-/*open*/
-typedef struct
-{	flag oerr;
-	ftnint ounit;
-	char *ofnm;
-	ftnlen ofnmlen;
-	char *osta;
-	char *oacc;
-	char *ofm;
-	ftnint orl;
-	char *oblnk;
-} olist;
-
-/*close*/
-typedef struct
-{	flag cerr;
-	ftnint cunit;
-	char *csta;
-} cllist;
-
-/*rewind, backspace, endfile*/
-typedef struct
-{	flag aerr;
-	ftnint aunit;
-} alist;
-
-/* inquire */
-typedef struct
-{	flag inerr;
-	ftnint inunit;
-	char *infile;
-	ftnlen infilen;
-	ftnint	*inex;	/*parameters in standard's order*/
-	ftnint	*inopen;
-	ftnint	*innum;
-	ftnint	*innamed;
-	char	*inname;
-	ftnlen	innamlen;
-	char	*inacc;
-	ftnlen	inacclen;
-	char	*inseq;
-	ftnlen	inseqlen;
-	char 	*indir;
-	ftnlen	indirlen;
-	char	*infmt;
-	ftnlen	infmtlen;
-	char	*inform;
-	ftnint	informlen;
-	char	*inunf;
-	ftnlen	inunflen;
-	ftnint	*inrecl;
-	ftnint	*innrec;
-	char	*inblank;
-	ftnlen	inblanklen;
-} inlist;
-
-#define VOID void
-
-union Multitype {	/* for multiple entry points */
-	integer1 g;
-	shortint h;
-	integer i;
-	/* longint j; */
-	real r;
-	doublereal d;
-	complex c;
-	doublecomplex z;
-	};
-
-typedef union Multitype Multitype;
-
-/*typedef long int Long;*/	/* No longer used; formerly in Namelist */
-
-struct Vardesc {	/* for Namelist */
-	char *name;
-	char *addr;
-	ftnlen *dims;
-	int  type;
-	};
-typedef struct Vardesc Vardesc;
-
-struct Namelist {
-	char *name;
-	Vardesc **vars;
-	int nvars;
-	};
-typedef struct Namelist Namelist;
-
-#define abs(x) ((x) >= 0 ? (x) : -(x))
-#define dabs(x) (doublereal)abs(x)
-#define min(a,b) ((a) <= (b) ? (a) : (b))
-#define max(a,b) ((a) >= (b) ? (a) : (b))
-#define dmin(a,b) (doublereal)min(a,b)
-#define dmax(a,b) (doublereal)max(a,b)
-#define bit_test(a,b)	((a) >> (b) & 1)
-#define bit_clear(a,b)	((a) & ~((uinteger)1 << (b)))
-#define bit_set(a,b)	((a) |  ((uinteger)1 << (b)))
-
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef int /* Unknown procedure type */ (*U_fp)(...);
-typedef shortint (*J_fp)(...);
-typedef integer (*I_fp)(...);
-typedef real (*R_fp)(...);
-typedef doublereal (*D_fp)(...), (*E_fp)(...);
-typedef /* Complex */ VOID (*C_fp)(...);
-typedef /* Double Complex */ VOID (*Z_fp)(...);
-typedef logical (*L_fp)(...);
-typedef shortlogical (*K_fp)(...);
-typedef /* Character */ VOID (*H_fp)(...);
-typedef /* Subroutine */ int (*S_fp)(...);
-#else
-typedef int /* Unknown procedure type */ (*U_fp)();
-typedef shortint (*J_fp)();
-typedef integer (*I_fp)();
-typedef real (*R_fp)();
-typedef doublereal (*D_fp)(), (*E_fp)();
-typedef /* Complex */ VOID (*C_fp)();
-typedef /* Double Complex */ VOID (*Z_fp)();
-typedef logical (*L_fp)();
-typedef shortlogical (*K_fp)();
-typedef /* Character */ VOID (*H_fp)();
-typedef /* Subroutine */ int (*S_fp)();
-#endif
-/* E_fp is for real functions when -R is not specified */
-typedef VOID C_f;	/* complex function */
-typedef VOID H_f;	/* character function */
-typedef VOID Z_f;	/* double complex function */
-typedef doublereal E_f;	/* real function with -R not specified */
-
-/* undef any lower-case symbols that your C compiler predefines, e.g.: */
-
-#ifndef Skip_f2c_Undefs
-#undef cray
-#undef gcos
-#undef mc68010
-#undef mc68020
-#undef mips
-#undef pdp11
-#undef sgi
-#undef sparc
-#undef sun
-#undef sun2
-#undef sun3
-#undef sun4
-#undef u370
-#undef u3b
-#undef u3b2
-#undef u3b5
-#undef unix
-#undef vax
-#endif
-#endif
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h
@@ -1,5 +1,44 @@
-#include "f2c.h"
+/*
+ * We have copied the definitions in f2c.h required
+ * to compile clapack.h, modified to support both
+ * 32 and 64 bit
+
+      http://opengrok.creo.hu/dragonfly/xref/src/contrib/gcc-3.4/libf2c/readme.netlib
+      http://www.ibm.com/developerworks/library/l-port64.html
+ */
+
+#ifdef _LP64
+typedef int integer;
+typedef unsigned int uinteger;
+typedef int logical;
+typedef long longint;		/* system-dependent */
+typedef unsigned long ulongint;	/* system-dependent */
+#else
+typedef long int integer;
+typedef unsigned long int uinteger;
+typedef long int logical;
+typedef long long longint;		/* system-dependent */
+typedef unsigned long long ulongint;	/* system-dependent */
+#endif
+
+typedef char *address;
+typedef short int shortint;
+typedef float real;
+typedef double doublereal;
+typedef struct { real r, i; } complex;
+typedef struct { doublereal r, i; } doublecomplex;
+typedef short int shortlogical;
+typedef char logical1;
+typedef char integer1;
+
+typedef logical (*L_fp)();
+typedef short ftnlen;
+
+/********************************************************/
+
 #include "clapack.h"
+
+/********************************************************/
 
 #define DVEC(A) int A##n, double*A##p
 #define CVEC(A) int A##n, double*A##p
