packages feed

control-monad-omega 0.3.1 → 0.3.2

raw patch · 2 files changed

+34/−4 lines, 2 filesdep +faildep ~base

Dependencies added: fail

Dependency ranges changed: base

Files

Control/Monad/Omega.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} ---------------------------------------------- -- | -- Module    : Control.Monad.Omega@@ -32,7 +33,7 @@ -- 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.  If you are using this as a monad, --- I recommendIded that you use the newer weighted-search package instead +-- I recommend that you use the newer weighted-search package instead  -- (it's also faster). ---------------------------------------------- @@ -45,6 +46,8 @@ import qualified Data.Foldable as Foldable import qualified Data.Traversable as Traversable +import qualified Control.Monad.Fail as Fail+ -- | This is the hinge algorithm of the Omega monad, -- exposed because it can be useful on its own.  Joins  -- a list of lists with the property that for every i j @@ -72,6 +75,12 @@ instance Monad Omega where     return x = Omega [x]     Omega m >>= f = Omega $ diagonal $ map (runOmega . f) m++#if !(MIN_VERSION_base(4,13,0))+    fail = Fail.fail+#endif++instance Fail.MonadFail Omega where     fail _ = Omega []  instance Monad.MonadPlus Omega where
control-monad-omega.cabal view
@@ -1,8 +1,9 @@+cabal-version: 1.12 Name: control-monad-omega Description:     A monad for enumerating sets: like the list     monad but breadth-first.-Version: 0.3.1+Version: 0.3.2 Stability: experimental Synopsis: A breadth-first list monad. License: PublicDomain@@ -11,5 +12,25 @@ Author: Luke Palmer Maintainer: lrpalmer@gmail.com Build-Type: Simple-Build-Depends: base <= 5-Exposed-Modules: Control.Monad.Omega+Tested-With:+  GHC ==7.0.4+   || ==7.2.2+   || ==7.4.2+   || ==7.6.3+   || ==7.8.4+   || ==7.10.3+   || ==8.0.2+   || ==8.2.2+   || ==8.4.4+   || ==8.6.5+   || ==8.8.1++library+  Default-Language: Haskell2010+  Build-Depends: base >=4.3 && <5+  Exposed-Modules: Control.Monad.Omega+  Other-Extensions: CPP++  if !impl(ghc >= 8.0)+    build-depends:+      fail >= 4.9.0.0 && <5