
Yes, though if you add the type signature in Foreign.Marshal.Error then if
someone had existing code that looks like:
import Foreign.Marshal.Error
import Control.Monad
blah blah void blah
then it'll conflict. Left with the more permissive type signature that would
just work.
-Edward Kmett
On Fri, Jan 8, 2010 at 10:08 PM, Gwern Branwen
On Fri, Jan 8, 2010 at 9:54 PM, Jeremy Shaw
wrote: Not sure if this came up already, but there is a less general version of void in Foreign.Marshal.Error:
http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.2.0.0/Foreign-M...
void :: IO a -> IO () Discard the return value of an IO action
Are there plans to unify the two? Perhaps Foreign.Marshal.Error can just re-export void from Control.Monad?
- jeremy
Don brought it up, and it's a consideration behind picking the name 'void'.
Re-exporting with the type signature (ie. rewrite it to be void :: IO a -> IO (); void = Control.Monad.void) is easy and won't break anything; it's something that can be done after Control.Monad.void has been added. One thing at a time.
-- gwern _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries