diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-02 11:20:27 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-02 11:20:55 -0400 |
commit | a702d292ec25fb54d7c2edc151e29412a2a54de6 (patch) | |
tree | ce7f532677c3782fdc68ba3c6dd4cfac3522b7b6 /Utility | |
parent | 6f3912350cecf2207002231d45c30a42ee8999f4 (diff) |
give <&&> and <||> same fixity as && and ||
Suggestion by Daniel Trstenjak
These are not currently mixed in my code base, so no real change.
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/Monad.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/Monad.hs b/Utility/Monad.hs index 6abd7ee5d..802a78722 100644 --- a/Utility/Monad.hs +++ b/Utility/Monad.hs @@ -45,6 +45,10 @@ ma <||> mb = ifM ma ( return True , mb ) (<&&>) :: Monad m => m Bool -> m Bool -> m Bool ma <&&> mb = ifM ma ( mb , return False ) +{- Same fixity as && and || -} +infixr 3 (<&&>) +infixr 2 (<||>) + {- Runs an action, passing its value to an observer before returning it. -} observe :: Monad m => (a -> m b) -> m a -> m a observe observer a = do |