summaryrefslogtreecommitdiff
path: root/Utility/Monad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/Monad.hs')
-rw-r--r--Utility/Monad.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/Monad.hs b/Utility/Monad.hs
index 9e2a16e8c..7f9c7b1bc 100644
--- a/Utility/Monad.hs
+++ b/Utility/Monad.hs
@@ -36,3 +36,7 @@ observe observer a = do
r <- a
_ <- observer r
return r
+
+{- Like observe, but the observer is not passed the value. -}
+observe_ :: (Monad m) => m b -> m a -> m a
+observe_ observer = observe (const observer)