Adding an ignore function to Control.Monad

Bulat Ziganshin bulat.ziganshin at
Fri Jun 12 00:45:36 EDT 2009

Hello Ganesh,

Friday, June 12, 2009, 2:21:54 AM, you wrote:

> On the flip side, could you give some examples where ignoring return
> values is useful and natural?

a lots of!

let dll_register mode = when (oldContextMenu /= contextMenu) $ do
                           runProgram$ "regsvr32 "++mode++" /s /c \""++(shext </> "ArcShellExt.dll\"")
                           runProgram$ "regsvr32 "++mode++" /s /c \""++(shext </> "ArcShellExt-64.dll\"")
                           return ()

here, runProgram returns program stdout. and, in runProgram

forkIO (hGetContents stderr >>= evaluate.length >> return ())

or this:

forkIO_ action = forkIO action >> return ()

again, used inside when


Best regards,
 Bulat                            mailto:Bulat.Ziganshin at

More information about the Libraries mailing list