mtl

Monad classes, using functional dependencies

http://github.com/haskell/mtl

Version on this page:2.2.2
LTS Haskell 22.17:2.3.1
Stackage Nightly 2024-04-18:2.3.1
Latest on Hackage:2.3.1@rev:1

See all snapshots mtl appears in

BSD-3-Clause licensed by Andy Gill
Maintained by Edward Kmett
This version can be pinned in stack with:mtl-2.2.2@sha256:1050fb71acd9f5d67da7d992583f5bd0eb14407b9dc7acc122af1b738b706ca3,2261

Module documentation for 2.2.2

  • Control
    • Control.Monad
      • Control.Monad.Cont
        • Control.Monad.Cont.Class
      • Control.Monad.Error
        • Control.Monad.Error.Class
      • Control.Monad.Except
      • Control.Monad.Identity
      • Control.Monad.List
      • Control.Monad.RWS
        • Control.Monad.RWS.Class
        • Control.Monad.RWS.Lazy
        • Control.Monad.RWS.Strict
      • Control.Monad.Reader
        • Control.Monad.Reader.Class
      • Control.Monad.State
        • Control.Monad.State.Class
        • Control.Monad.State.Lazy
        • Control.Monad.State.Strict
      • Control.Monad.Trans
      • Control.Monad.Writer
        • Control.Monad.Writer.Class
        • Control.Monad.Writer.Lazy
        • Control.Monad.Writer.Strict

The mtl Package Hackage Build Status

See mtl on Hackage for more information.

Changes

2.2.2

  • Control.Monad.Identity now re-exports Control.Monad.Trans.Identity
  • Fix a bug in which Control.Monad.State.Class.modify' was not as strict in the new state as its counterparts in transformers
  • Add a MonadError () Maybe instance
  • Add liftEither :: MonadError e m => Either e a -> m a to Control.Monad.Except{.Class}
  • Add a MonadWriter w ((,) w) instance (when built against base-4.9 or later)

2.2.1

  • Provide MINIMAL pragmas for MonadState, MonadWriter, MonadReader
  • Added a cyclic definition of ask in terms of reader for consistency with get/put vs. state and tell vs. writer
  • Fix deprecation warnings caused by transformers 0.4 deprecating ErrorT.
  • Added Control.Monad.Except in the style of the other mtl re-export modules

2.2.0.1

  • Fixed a bug caused by the change in how transformers 0.4 exports its data types. We will now export runFooT for each transformer again!

2.2

  • transformers 0.4 support
  • Added instances for ExceptT
  • Added modify' to Control.Monad.State.*

2.1.3.1

  • Avoid importing Control.Monad.Instances on GHC 7.8 to build without deprecation warnings.

2.1.3

  • Removed the now-irrelevant Error constraint from the MonadError instance for Either e.