Repository : ssh://[email protected]/binary On branch : ghc-head Link : http://git.haskell.org/?p=packages/binary.git;a=commit;h=3625372cad6796515eff405a37afa17cdbf2d2fe
>--------------------------------------------------------------- commit 3625372cad6796515eff405a37afa17cdbf2d2fe Author: Daniel Diaz <[email protected]> Date: Mon Apr 15 22:53:29 2013 -0400 Added MonadPlus instance. >--------------------------------------------------------------- 3625372cad6796515eff405a37afa17cdbf2d2fe src/Data/Binary/Get/Internal.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Data/Binary/Get/Internal.hs b/src/Data/Binary/Get/Internal.hs index 53346cc..a79f16d 100644 --- a/src/Data/Binary/Get/Internal.hs +++ b/src/Data/Binary/Get/Internal.hs @@ -42,6 +42,7 @@ import qualified Data.ByteString.Internal as B import qualified Data.ByteString.Unsafe as B import Control.Applicative +import Control.Monad #if __GLASGOW_HASKELL__ < 704 && !defined(__HADDOCK__) -- needed for (# unboxing #) with magic hash @@ -116,6 +117,10 @@ instance Applicative Get where (<*>) = apG {-# INLINE (<*>) #-} +instance MonadPlus Get where + mzero = empty + mplus = (<|>) + instance Functor Get where fmap = fmapG _______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
