when package:classy-prelude

Conditional execution of Applicative expressions. For example,
when debug (putStrLn "Debugging")
will output the string Debugging if the Boolean value debug is True, and otherwise do nothing.
Only perform the action if the predicate returns True. Since 0.9.2