[commit: base] master: Generalize the type of Foreign.Marshal.Utils.maybeNew; fixes trac #5044 (b27b90f)

Repository : ssh://darcs.haskell.org//srv/darcs/packages/base On branch : master http://hackage.haskell.org/trac/ghc/changeset/b27b90f0e55518313d9611fbc4381b...
---------------------------------------------------------------
commit b27b90f0e55518313d9611fbc4381b4b73121975
Author: Ian Lynagh
---------------------------------------------------------------
Foreign/Marshal/Utils.hs | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Foreign/Marshal/Utils.hs b/Foreign/Marshal/Utils.hs index 5ae677a..bf9bdb3 100644 --- a/Foreign/Marshal/Utils.hs +++ b/Foreign/Marshal/Utils.hs @@ -118,8 +118,8 @@ toBool = (/= 0) -- -- * the 'nullPtr' is used to represent 'Nothing' -- -maybeNew :: ( a -> IO (Ptr a)) - -> (Maybe a -> IO (Ptr a)) +maybeNew :: ( a -> IO (Ptr b)) + -> (Maybe a -> IO (Ptr b)) maybeNew = maybe (return nullPtr) -- |Converts a @withXXX@ combinator into one marshalling a value wrapped
participants (1)
-
Ian Lynagh