From cc2c8c39dc088dcace0d2749cfe9180bf5fdbfd2 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Sat, 16 Jun 2007 11:20:50 +0000 Subject: differentiation, integration, special --- lib/Data/Packed/Internal/Common.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Data/Packed') diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs index dddd269..acefe92 100644 --- a/lib/Data/Packed/Internal/Common.hs +++ b/lib/Data/Packed/Internal/Common.hs @@ -82,3 +82,7 @@ isComp w x = typeOf (undefined :: Complex Double) == typeOf (w x) scast :: forall a . forall b . (Typeable a, Typeable b) => a -> b scast = fromJust . cast + +{- | 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)) -- cgit v1.2.3