diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Common.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Common.hs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs index 1bfed6d..1212968 100644 --- a/lib/Data/Packed/Internal/Common.hs +++ b/lib/Data/Packed/Internal/Common.hs | |||
@@ -28,7 +28,7 @@ debug x = trace (show x) x | |||
28 | data Vector t = V { dim :: Int | 28 | data Vector t = V { dim :: Int |
29 | , fptr :: ForeignPtr t | 29 | , fptr :: ForeignPtr t |
30 | , ptr :: Ptr t | 30 | , ptr :: Ptr t |
31 | } deriving Typeable | 31 | } -- deriving Typeable |
32 | 32 | ||
33 | ---------------------------------------------------------------------- | 33 | ---------------------------------------------------------------------- |
34 | instance (Storable a, RealFloat a) => Storable (Complex a) where -- | 34 | instance (Storable a, RealFloat a) => Storable (Complex a) where -- |
@@ -78,17 +78,17 @@ check msg ls f = do | |||
78 | mapM_ (touchForeignPtr . fptr) ls | 78 | mapM_ (touchForeignPtr . fptr) ls |
79 | return () | 79 | return () |
80 | 80 | ||
81 | class (Storable a, Typeable a) => Field a | 81 | --class (Storable a, Typeable a) => Field a |
82 | instance (Storable a, Typeable a) => Field a | 82 | --instance (Storable a, Typeable a) => Field a |
83 | 83 | ||
84 | isReal :: (Data.Typeable.Typeable a) => (t -> a) -> t -> Bool | 84 | --isReal :: (Data.Typeable.Typeable a) => (t -> a) -> t -> Bool |
85 | isReal w x = typeOf (undefined :: Double) == typeOf (w x) | 85 | --isReal w x = typeOf (undefined :: Double) == typeOf (w x) |
86 | 86 | ||
87 | isComp :: (Data.Typeable.Typeable a) => (t -> a) -> t -> Bool | 87 | --isComp :: (Data.Typeable.Typeable a) => (t -> a) -> t -> Bool |
88 | isComp w x = typeOf (undefined :: Complex Double) == typeOf (w x) | 88 | --isComp w x = typeOf (undefined :: Complex Double) == typeOf (w x) |
89 | 89 | ||
90 | scast :: forall a . forall b . (Typeable a, Typeable b) => a -> b | 90 | --scast :: forall a . forall b . (Typeable a, Typeable b) => a -> b |
91 | scast = fromJust . cast | 91 | --scast = fromJust . cast |
92 | 92 | ||
93 | {- | conversion of Haskell functions into function pointers that can be used in the C side | 93 | {- | conversion of Haskell functions into function pointers that can be used in the C side |
94 | -} | 94 | -} |