Skip to content

Commit 4ac38ab

Browse files
committed
Describe laws for NonDet
Adaptation of #317 that uses single line comments.
1 parent 7874960 commit 4ac38ab

File tree

1 file changed

+4
-0
lines changed
  • effectful-core/src/Effectful/Internal

1 file changed

+4
-0
lines changed

effectful-core/src/Effectful/Internal/Monad.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ instance MonadFix (Eff es) where
338338
-- | Provide the ability to use the 'Alternative' and 'MonadPlus' instance for
339339
-- 'Eff'.
340340
--
341+
-- /Note:/ 'NonDet' does not backtrack. Formally, it obeys the "left-catch" law
342+
-- for 'MonadPlus', rather than the "left-distribution" law. This means that it
343+
-- behaves more like 'Maybe' than @[]@.
344+
--
341345
-- @since 2.2.0.0
342346
data NonDet :: Effect where
343347
Empty :: NonDet m a

0 commit comments

Comments
 (0)