packages feed

effect-stack-0.3.0.1: effect-stack.cabal

name:                effect-stack
version:             0.3.0.1
synopsis:            Reducing the pain of transformer stacks with duplicated effects
description:         The @mtl@ provides a nice way to write monadic actions
                     which take advantage of a particular kind of effect (say,
                     statefulness or exception handling) without being forced
                     to say exactly which monad is providing that effect.
                     However, if a transformer stack includes two transformers
                     that provide the given effect, @mtl@ does not provide a
                     clean way to disambiguate which one is wanted; the topmost
                     one is always chosen.
                     .
                     This package provides tools for disambiguating without
                     being forced to choose a particular transformer stack. It
                     provides a separate stack for each kind of effect; you may
                     then disambiguate by depth within each stack. For example,
                     in a stack with two @StateT@ transformers, one can write
                     .
                     @foo :: MonadStateDepth 0 m a => m a
                     foo = depthState \@0 get@
                     .
                     for access to the topmost state effects, or
                     .
                     @bar :: MonadStateDepth 1 m a => m a
                     bar = depthState \@1 get@
                     .
                     for access to the state from underneath the topmost
                     @StateT@, no matter how deep in the stack the two
                     @StateT@s are.
                     .
                     See the readme for more detailed motivation, usage
                     examples, and documentation.
license:             BSD3
license-file:        LICENSE
author:              Daniel Wagner
maintainer:          me@dmwit.com
-- copyright:
category:            Control
build-type:          Simple
extra-source-files:  ChangeLog.md README.md
cabal-version:       2.0

source-repository head
  type:     git
  location: https://github.com/dmwit/effect-stack

library
  exposed-modules:
                       Control.Monad.Stack.Accum,
                       Control.Monad.Stack.Cont,
                       Control.Monad.Stack.Error,
                       Control.Monad.Stack.Fail,
                       Control.Monad.Stack.Internal,
                       Control.Monad.Stack.Reader,
                       Control.Monad.Stack.Select,
                       Control.Monad.Stack.State,
                       Control.Monad.Stack.Writer
  other-extensions:
                       AllowAmbiguousTypes,
                       ConstraintKinds,
                       DataKinds,
                       FlexibleContexts,
                       KindSignatures,
                       PolyKinds,
                       RankNTypes,
                       ScopedTypeVariables,
                       TypeApplications,
                       TypeFamilies,
                       TypeOperators,
                       UndecidableInstances
  build-depends:
                       base >= 4.12 && <= 4.20.0.0,
                       constraints >= 0.11 && <= 0.14.2,
                       mtl >= 2.2 && <= 2.3.1,
                       transformers >= 0.5.6 && <= 0.6.1.1
  default-language:    Haskell2010
  ghc-options:         -fno-warn-tabs