Foreign.Marshal.Error.void

Hi, Wouldn't it be nice if we had something like 'void' in Foreign.Marshal.Error in standard monad functions, so that we could use it instead of, for instance, mapM_ or sequence_? Best, MaurĂcio

On Tue, Oct 14, 2008 at 12:52 PM, Mauricio
Wouldn't it be nice if we had something like 'void' in Foreign.Marshal.Error in standard monad functions, so that we could use it instead of, for instance, mapM_ or sequence_?
Dunno. I thought about using 'void' in the situation where my 'when' action wasn't IO (). It was IO something else, where the something wasn't something I needed. It's a little irritating to have to do >> return () or whatever.

mapM and mapM_ have different complexity - I don't know if the
compiler would be smart enough to infer mapM_ style behavior for (void
. mapM).
/g
On Tue, Oct 14, 2008 at 10:52 AM, Mauricio
Hi,
Wouldn't it be nice if we had something like 'void' in Foreign.Marshal.Error in standard monad functions, so that we could use it instead of, for instance, mapM_ or sequence_?
Best, MaurĂcio
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- I am in here

On Tue, Oct 14, 2008 at 1:45 PM, J. Garrett Morris
mapM and mapM_ have different complexity - I don't know if the compiler would be smart enough to infer mapM_ style behavior for (void . mapM).
But there's the possibility of {-# RULES #-} pragmas to help it be smart enough. Luke
participants (4)
-
brian
-
J. Garrett Morris
-
Luke Palmer
-
Mauricio