packages feed

control-monad-omega 0.2 → 0.3

raw patch · 2 files changed

+11/−1 lines, 2 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Control.Monad.Omega: instance MonadPlus Omega

Files

Control/Monad/Omega.hs view
@@ -27,6 +27,11 @@ -- -- This monad gets its name because it is a monad over sets of order type -- omega.+--+-- Warning: Omega is only a monad when the results of @runOmega@ are+-- interpreted as a set; that is, a valid transformation according to the+-- monad laws may change the order of the results.  However, the same+-- set of results will always be reachable.  ----------------------------------------------  module Control.Monad.Omega @@ -66,6 +71,10 @@     return x = Omega [x]     Omega m >>= f = Omega $ diagonal $ map (runOmega . f) m     fail _ = Omega []++instance Monad.MonadPlus Omega where+    mzero = Omega []+    mplus (Omega xs) (Omega ys) = Omega (diagonal [xs,ys])  instance Applicative.Applicative Omega where     pure = return
control-monad-omega.cabal view
@@ -2,11 +2,12 @@ Description:     A monad for enumerating sets: like the list     monad but breadth-first.-Version: 0.2+Version: 0.3 Stability: experimental Synopsis: A breadth-first list monad. License: PublicDomain Category: Control+Homepage: http://github.com/luqui/control-monad-omega Author: Luke Palmer Maintainer: lrpalmer@gmail.com Build-Type: Simple