1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Generalize disjunction over the carrier.

This commit is contained in:
Rob Rix 2018-10-23 11:39:09 -04:00
parent c53a6aa511
commit c4aaa86230

View File

@ -126,7 +126,7 @@ ifthenelse :: (Member (Boolean value) sig, Carrier sig m, Monad m) => value -> m
ifthenelse v t e = asBool v >>= \ c -> if c then t else e
-- | Compute the disjunction (boolean or) of two computed values. This should have short-circuiting semantics where applicable.
disjunction :: (Member (Boolean value) sig, Carrier sig m) => Evaluator term address value m value -> Evaluator term address value m value -> Evaluator term address value m value
disjunction :: (Member (Boolean value) sig, Carrier sig m) => m value -> m value -> m value
disjunction a b = send (Disjunction a b ret)
data Boolean value m k