Commit 7680552b authored by Oleg Grenrus's avatar Oleg Grenrus Committed by Herbert Valerio Riedel

Add control-monad-omega-0.3.1 patch

parent 29352158
diff --git a/Control/Monad/Omega.hs b/Control/Monad/Omega.hs
index a9e14e4..ec16ba8 100644
--- a/Control/Monad/Omega.hs
+++ b/Control/Monad/Omega.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
----------------------------------------------
-- |
-- Module : Control.Monad.Omega
@@ -45,6 +46,8 @@ import qualified Control.Applicative as Applicative
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 Functor Omega where
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
diff --git a/control-monad-omega.cabal b/control-monad-omega.cabal
index a04ab5f..65e56cf 100644
--- a/control-monad-omega.cabal
+++ b/control-monad-omega.cabal
@@ -1,3 +1,4 @@
+cabal-version: 1.12
Name: control-monad-omega
Description:
A monad for enumerating sets: like the list
@@ -11,5 +12,25 @@ Homepage: http://github.com/luqui/control-monad-omega
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment