d65ae5693b856523ed4c55e6bb3d3789f7a2a820
[packages/haskell2010.git] / Foreign / Marshal / Error.hs
1 {-# LANGUAGE CPP, PackageImports #-}
2 #if __GLASGOW_HASKELL__ >= 701
3 {-# LANGUAGE Safe #-}
4 #endif
5
6 module Foreign.Marshal.Error (
7 throwIf, -- :: (a -> Bool) -> (a -> String) -> IO a -> IO a
8 throwIf_, -- :: (a -> Bool) -> (a -> String) -> IO a -> IO ()
9 throwIfNeg, -- :: (Ord a, Num a)
10 -- => (a -> String) -> IO a -> IO a
11 throwIfNeg_, -- :: (Ord a, Num a)
12 -- => (a -> String) -> IO a -> IO ()
13 throwIfNull, -- :: String -> IO (Ptr a) -> IO (Ptr a)
14
15 -- Discard return value
16 --
17 void -- IO a -> IO ()
18
19 ) where
20 import "base" Foreign.Marshal.Error hiding (void)
21
22 -- |Discard the return value of an 'IO' action
23 --
24 void :: IO a -> IO ()
25 void act = act >> return ()
26 -- base's version is deprecated