Commit f913c358 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Add an infix version of when (<?>).

parent 9fbf3c8c
......@@ -4,7 +4,7 @@ module Oracles.Flag (
module Control.Monad,
module Prelude,
Flag (..),
test, when, unless, not, (&&), (||)
test, when, unless, not, (&&), (||), (<?>)
) where
import Control.Monad hiding (when, unless)
......@@ -60,6 +60,10 @@ unless x act = do
bool <- toCondition x
if bool then mempty else act
-- Infix version of when
(<?>) :: (ToCondition a, Monoid m) => a -> Action m -> Action m
(<?>) = when
class Not a where
type NotResult a
not :: a -> NotResult a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment