|
@@ -1,3 +1,6 @@
|
|
|
+{-# LANGUAGE ExistentialQuantification #-}
|
|
|
+{-# LANGUAGE KindSignatures #-}
|
|
|
+
|
|
|
module Control.Monad.Extras (
|
|
|
ifM,
|
|
|
unlessM,
|
|
@@ -8,9 +11,6 @@ module Control.Monad.Extras (
|
|
|
import Control.Monad
|
|
|
import Control.Applicative
|
|
|
|
|
|
-ifThenElse :: Bool -> a -> a -> a
|
|
|
-ifThenElse i t e = if i then t else e
|
|
|
-
|
|
|
-- | A version of if with monadic test.
|
|
|
ifM :: Monad m => m Bool -> m a -> m a -> m a
|
|
|
ifM i t e = do
|