diff options
Diffstat (limited to 'security/hs-cryptol/files/patch-src_Cryptol_Utils_Patterns.hs')
-rw-r--r-- | security/hs-cryptol/files/patch-src_Cryptol_Utils_Patterns.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/security/hs-cryptol/files/patch-src_Cryptol_Utils_Patterns.hs b/security/hs-cryptol/files/patch-src_Cryptol_Utils_Patterns.hs new file mode 100644 index 000000000000..d3879d7a4258 --- /dev/null +++ b/security/hs-cryptol/files/patch-src_Cryptol_Utils_Patterns.hs @@ -0,0 +1,24 @@ +--- src/Cryptol/Utils/Patterns.hs.orig 2001-09-09 01:46:40 UTC ++++ src/Cryptol/Utils/Patterns.hs +@@ -5,6 +5,7 @@ + module Cryptol.Utils.Patterns where + + import Control.Monad(liftM,liftM2,ap,MonadPlus(..),guard) ++import qualified Control.Monad.Fail as Fail + import Control.Applicative(Alternative(..)) + + newtype Match b = Match (forall r. r -> (b -> r) -> r) +@@ -17,10 +18,12 @@ instance Applicative Match where + (<*>) = ap + + instance Monad Match where +- fail _ = empty + Match m >>= f = Match $ \no yes -> m no $ \a -> + let Match n = f a in + n no yes ++ ++instance Fail.MonadFail Match where ++ fail _ = empty + + instance Alternative Match where + empty = Match $ \no _ -> no |