1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 18:36:27 +03:00

Correct a 📝.

This commit is contained in:
Rob Rix 2017-12-21 16:37:28 -05:00
parent 6d026b8ace
commit d2a903f204

View File

@ -16,7 +16,7 @@ class (Alternative m, Monad m) => MonadNonDet m where
-> m a -- ^ The computation to run locally-nondeterministically.
-> m b -- ^ A _deterministic_ computation producing the 'Monoid'al accumulation of the _locally-nondeterministic_ result values.
-- | Effect stacks containing 'NonDetEff' offer a 'MonadNonDet' instance which implements 'collect' by interpreting the requests for nondeterminism locally, without removing 'NonDetEff' from the stack—i.e. the _capacity_ for nondeterminism is still present in the effect stack, but any local nondeterminism has been applied.
-- | Effect stacks containing 'NonDetEff' offer a 'MonadNonDet' instance which implements 'gather' by interpreting the requests for nondeterminism locally, without removing 'NonDetEff' from the stack—i.e. the _capacity_ for nondeterminism is still present in the effect stack, but any local nondeterminism has been applied.
instance (NonDetEff :< fs) => MonadNonDet (Eff fs) where
gather f = interpose (pure . f) (\ m k -> case m of
MZero -> pure mempty