1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 02:14:20 +03:00

Generalize scatter.

This commit is contained in:
Rob Rix 2018-05-02 18:42:58 -04:00
parent 8ca1a5112a
commit 63f4544496

View File

@ -117,7 +117,7 @@ converge f = loop
loop x'
-- | Nondeterministically write each of a collection of stores & return their associated results.
scatter :: (Alternative (m effects), Foldable t, MonadEvaluator location term value effects m) => t (a, Heap location value) -> m effects a
scatter :: (Alternative (m effects), Evaluator location term value m, Foldable t, Member (State (Heap location value)) effects) => t (a, Heap location value) -> m effects a
scatter = foldMapA (\ (value, heap') -> putHeap heap' $> value)