packages feed

distributed-process-monad-control 0.5.0 → 0.5.1

raw patch · 2 files changed

+19/−3 lines, 2 filesdep ~monad-controlPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: monad-control

API changes (from Hackage documentation)

Files

distributed-process-monad-control.cabal view
@@ -2,7 +2,7 @@ --   For further documentation, see http://haskell.org/cabal/users-guide/  name:                distributed-process-monad-control-version:             0.5.0+version:             0.5.1 synopsis:            Orphan instances for MonadBase and MonadBaseControl. homepage:            http://haskell-distributed.github.io license:             BSD3@@ -19,7 +19,10 @@   @'MonadBaseControl' @'IO' for the @'Process' monad. This is for use   in conjunction with a library requiring these instances, such as the   @<http://hackage.haskell.org/package/lifted-base lifted-base> package.-  . +  .+  A tutorial segment regarding use of this in distributed-process applications may+  be found <http://haskell-distributed.github.io/tutorials/3ch.html#monad-transformer-stacks here>.+  .   example usage:   .    >import Control.Distributed.Process.MonadBaseControl()@@ -33,7 +36,7 @@   -- other-modules:          build-depends:      base >= 4.4 && <= 5                     , distributed-process >= 0.4.2 && < 0.6.0-                    , monad-control >= 0.3 && <= 0.4+                    , monad-control >= 0.3 && < 1.1                     , transformers                     , transformers-base >= 0.4.1 && <= 0.5.0    hs-source-dirs:     src
src/Control/Distributed/Process/MonadBaseControl.hs view
@@ -2,7 +2,12 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE CPP #-} +#if MIN_VERSION_monad_control(1,0,0)+{-# LANGUAGE UndecidableInstances #-}+#endif+ {-# OPTIONS_GHC -fno-warn-orphans #-} -- | This module only exports instances for 'MonadBase' 'IO' and -- 'MonadBaseControl' 'IO' for the 'Process' monad. This is for use@@ -32,7 +37,15 @@  deriving instance MonadBase IO Process ++#if MIN_VERSION_monad_control(1,0,0) instance MonadBaseControl IO Process where+  type StM Process a = StM (ReaderT LocalProcess IO) a+  liftBaseWith f = Process $ liftBaseWith $ \ rib -> f (rib . unProcess)+  restoreM = Process . restoreM+#else+instance MonadBaseControl IO Process where   newtype StM Process a = StProcess {_unSTProcess :: StM (ReaderT LocalProcess IO) a}   restoreM (StProcess m) = Process $ restoreM m   liftBaseWith f = Process $ liftBaseWith $ \ rib -> f (fmap StProcess . rib . unProcess)+#endif