ghc-shelly/shelly-Alternative.patch
Jens Petersen bafbf83e23 update to 1.5.2
patch for ghc-7.10
2016-10-05 16:58:47 +09:00

14 lines
383 B
Diff

--- shelly-1.5.2/src/Shelly/Pipe.hs~ 2014-03-25 12:34:44.000000000 +0900
+++ shelly-1.5.2/src/Shelly/Pipe.hs 2016-10-05 16:54:59.613245757 +0900
@@ -138,6 +138,10 @@
pure = return
(<*>) = ap
+instance Alternative Sh where
+ (<|>) = mplus
+ empty = mzero
+
instance MonadPlus Sh where
mzero = Sh $ return []
mplus a b = Sh $ liftA2 (++) (unSh a) (unSh b)