deriving-trans

Derive instances for monad transformer stacks

https://github.com/jumper149/deriving-trans

Version on this page:0.5.2.0
LTS Haskell 22.17:0.9.1.0
Stackage Nightly 2024-04-18:0.9.1.0
Latest on Hackage:0.9.1.0

See all snapshots deriving-trans appears in

BSD-3-Clause licensed by Felix Springer
Maintained by [email protected]
This version can be pinned in stack with:deriving-trans-0.5.2.0@sha256:e09c34826123ab9144754dbc3bb98fe1832b9c55bddcdcde3245b4115b79b93b,2599

Implementing instances for monad transformer stacks can be tedious. mtl defines each instance for each transfomer, but this can be avoided.

Elevator let's you access instances of the underlying monad of a transformer. Composing transformers with ComposeT brings instances into scope during the initialization of a transformer stack.

Elevator can be used with DerivingVia to select a specific transformer to derive instances for a transformer stack. ComposeT composes transformers and accumulates instances in a transformer stack.

Changes

Revision history for deriving-trans

0.5.2.0 17 Jan 2023

  • Add optional dependency primitive.
  • Add MonadPrim instances to Elevator and ComposeT.

0.5.1.0 11 Jan 2023

  • Introduce cabal flags exceptions, mtl and unliftio. These flags enable the dependency on additional optional packages, to reduce the requirement of orphan instances.
  • Add MonadUnliftIO instances to Elevator and ComposeT.
  • Add MonadThrow and MonadCatch instances to Elevator and ComposeT.
  • Add MonadThrow and MonadCatch “base-case” instances for CatchT to ComposeT.

0.5.0.1 04 Aug 2022

  • Improve Haddock examples.

0.5.0.0 25 Jul 2022

  • Add module Control.Monad.Trans.Compose.Infix.
  • Add module Control.Monad.Trans.Compose.Stack.
  • Add module Control.Monad.Trans.Compose.Transparent.
  • Improve and update Haddock documentation and examples.

0.4.0.0 18 Jul 2022

  • Add dependency on monad-control-identity.
  • Add instances for MonadTransControlIdentity and MonadBaseControlIdentity.
  • Add MonadZip instance to Elevator.
  • Constrain the MonadFix instance for Elevator with MonadTransControlIdentity.

0.3.2.0 31 Mar 2022

  • Remove version boundaries of dependencies.

0.3.1.0 08 Feb 2022

  • Add MonadFix instance to Elevator.

0.3.0.0 04 Feb 2022

  • Add “base-case” instances for both lazy and strict transformers (from mtl) to ComposeT.
  • Add Alternative and MonadPlus instances to Elevator.
  • Add MonadFail instance to Elevator.
  • Add MonadCont instances to Elevator and ComposeT.
  • Add MonadCont “base-case” instance for ContT to ComposeT.
  • Add MonadRWS instances to Elevator and ComposeT. It’s not quite clear, whether this is necessary
  • Add “base-case” instances for RWST to ComposeT.

0.2.2.1 01 Feb 2022

  • Polish Haddock comments.

0.2.2.0 30 Jan 2022

  • Add “base-case” instances for mtl’s type classes to ComposeT.
  • Add Haddock examples and improve comments.

0.2.1.0 27 Jan 2022

  • Add MonadTrans and MonadTransControl instances to Elevator.
  • Use StandaloneKindSignatures.
  • Add Haddock documentation.

0.2.0.0 25 Jan 2022

  • Completely change the idea of this project. Pretty much everything has been changed.

0.1.0.0 19 Jun 2021

  • First version. Released on an unsuspecting world.