monadLib 3.4.4 → 3.4.5
raw patch · 3 files changed
+17/−12 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ MonadLib: instance BaseM (ST s) (ST s)
Files
- README +3/−3
- monadLib.cabal +6/−3
- src/MonadLib.hs +8/−6
README view
@@ -1,6 +1,5 @@ This is version 3 of 'monadLib'. The library is in the directory 'src'.-In this directory we have bureaucratic overhead. Files ~~~~~@@ -10,8 +9,9 @@ Setup.hs Used by the Cabal framework. monadLib.cabal Used by the Cabal framework. -src/MonadLib.hs The library.-src/Monads.hs Definitions for some more base monads (optional).+src/MonadLib.hs The library.+src/MonadLib/Derive.hs Definitions useful for monads defined with newtype.+src/MonadLib/Monads.hs Definitions for some more base monads (optional). Simple Installation
monadLib.cabal view
@@ -1,5 +1,5 @@ Name: monadLib-Version: 3.4.4+Version: 3.4.5 License: BSD3 License-file: LICENSE Author: Iavor S. Diatchki@@ -13,7 +13,10 @@ Build-type: Simple Extra-source-files: LICENSE, README, CHANGES Exposed-modules: MonadLib, MonadLib.Monads, MonadLib.Derive++ Extensions:- MultiParamTypeClasses, FunctionalDependencies, Rank2Types-GHC-options: -O2 -W -fallow-undecidable-instances+ MultiParamTypeClasses, FunctionalDependencies, Rank2Types,+ UndecidableInstances+GHC-options: -O2 -W
src/MonadLib.hs view
@@ -8,7 +8,7 @@ Id, Lift, IdT, ReaderT, WriterT, StateT, ExceptionT,- -- + -- -- $WriterM_ExceptionT ChoiceT, ContT, @@ -43,6 +43,7 @@ import Control.Applicative import Control.Monad import Control.Monad.Fix+import Control.Monad.ST (ST) import qualified Control.Exception as IO (throwIO,try,Exception) import Data.Monoid import Prelude hiding (Ordering(..))@@ -242,11 +243,12 @@ -- | Promote a computation from the base monad. inBase :: n a -> m a -instance BaseM IO IO where inBase = id-instance BaseM Maybe Maybe where inBase = id-instance BaseM [] [] where inBase = id-instance BaseM Id Id where inBase = id-instance BaseM Lift Lift where inBase = id+instance BaseM IO IO where inBase = id+instance BaseM Maybe Maybe where inBase = id+instance BaseM [] [] where inBase = id+instance BaseM Id Id where inBase = id+instance BaseM Lift Lift where inBase = id+instance BaseM (ST s) (ST s) where inBase = id instance (BaseM m n) => BaseM (IdT m) n where inBase = t_inBase