| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Description | |||||||||||||||||||||||||||
Library for control flow inside of monads with anaphoric variants on if and when and a C-like "switch" function. Information:
| |||||||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Documentation | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
A if with no else for unit returning thunks. Returns the value of the test. | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Like a switch statement, and less cluttered than if else if cond [ (t1,a1), (t2,a2), ... ] | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Like a switch statement, and less cluttered than if else if condM [ (t1,a1), (t2,a2), ... ] | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Chainable anaphoric when. Takes a maybe value. if the value is Just x then execute action x , then return True . otherwise return False . | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Chainable anaphoric whenM. | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Anaphoric when-else chain. Like a switch statement, but less cluttered | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Anaphoric if. | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Anaphoric if where the test is in Monad m. | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Contrapositive of whenM, if not x then do y unless-else chain. monadic unless-else chain | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
IO lifted && IO lifted || Conditionally do the right action based on the truth value of the left expression unless the left side is true, perform the right action unless the (monadic) left side is true, perform the right action Bind the result of the last expression in an anaphoric when. composition of >>= and >>? composition of >>= and >>=? Execute a monadic action so long as a monadic boolean returns true. | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Negation of whileM: execute an action so long as the boolean returns false. | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Strict version of return because usually we don't need that extra thunk. | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Take an action and make it into a side-effecting return. Because I seem to keep running into m () and the like. | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
This conversion is common enough to make a name for. | |||||||||||||||||||||||||||
Produced by Haddock version 2.6.0 |