diff options
author | Ian Lynagh <igloo@earth.li> | 2011-04-03 14:55:50 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-04-03 14:55:50 +0100 |
commit | 94639222f6a4f86ee3acfa4822e566e190392533 (patch) | |
tree | 79ab40c02c3624cea0d68da5a52cef1a981cf5e8 /libraries | |
parent | 5534946929ff20d52b04b582a079860a8d089661 (diff) | |
download | haskell-94639222f6a4f86ee3acfa4822e566e190392533.tar.gz |
Generalize the type of Foreign.Marshal.Utils.maybeNew; fixes trac #5044
git conversion of:
Tue Mar 8 22:31:07 CET 2011 Bas van Dijk <v.dijk.bas@gmail.com>
* Generalize the type of Foreign.Marshal.Utils.maybeNew
This makes it consistent with maybeWith
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Foreign/Marshal/Utils.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/base/Foreign/Marshal/Utils.hs b/libraries/base/Foreign/Marshal/Utils.hs index 5ae677a19d..bf9bdb3c8b 100644 --- a/libraries/base/Foreign/Marshal/Utils.hs +++ b/libraries/base/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 |