[Haskell] Re: ANNOUNCE: HNOP 0.1

Paul Johnson paul at cogito.org.uk
Sat Jul 1 14:55:21 EDT 2006


> One interesting line of development would be to spin off the core 
> functionality into a separate library, to provide no-op services to 
> other Haskell applications.

Actually this would be useful, and probably belongs in Control.Monad (although I'd call it "noOp" rather than "noop").

I was recently working on code that took monadic actions as parameters, so that under the right circumstances the appropriate action would be executed.  On several occasions I had to pass "return ()" as a null action.  Having an explicit "noOp :: Monad m => m ()" would have made the code shorter and clearer.

Paul.



More information about the Haskell mailing list