[Haskell-beginners] shortcut for printing to stderr

Brent Yorgey byorgey at seas.upenn.edu
Wed May 18 15:28:25 CEST 2011


On Tue, May 17, 2011 at 09:45:48PM -0800, Christopher Howard wrote:
> I use a formula like this very often:
> 
>   hPutStrLn stderr "error message"
> 
> Is there not some shortcut function in base that prints to stderr
> without having to pass in the handle? Obviously it is not hard to define
> one, but it would be neat to know if there was already one in base. (I
> couldn't seem to find one in the System.IO listing.)

Not to my knowledge.  Generally speaking, such functions (which are
just simple combinations of other things) are not usually included in
the standard library.

-Brent



More information about the Beginners mailing list