[Haskell-cafe] global, modifiable variable for debugging

briand at aracnet.com briand at aracnet.com
Sun Dec 26 20:53:55 CET 2010


Hi,

I have a program with a debug flag in it (Strangely I've yet to be
able to write bug-free code).  I'd like to change the state of the
debug flag based on command line args.

I looked at IOVar but that would cause all the pure procedures to get
swallowed by the IO Monad.

Is a better way to get this behavior ?

Thanks,

Brian




More information about the Haskell-Cafe mailing list