packages feed

multistate-0.1.1: multistate.cabal

Name:          multistate
Version:       0.1.1
Cabal-Version: >= 1.8
Build-Type:    Simple
license:       BSD3
license-file:  LICENSE
Copyright:     Jan Bracker, Lennart Spitzner
Maintainer:    Lennart Spitzner <lsp@informatik.uni-kiel.de>
Author:        Jan Bracker, Lennart Spitzner
Homepage:      https://github.com/lspitzner/multistate
Bug-reports:   https://github.com/lspitzner/multistate/issues
Stability:     Experimental
category:      Control
tested-with:   GHC == 7.8.2

Synopsis: like mtl's ReaderT/StateT, but more than one contained value/type.
Description:
  When using multiple ReaderT's or StateT's in the same monad stack, it becomes
  necessary to lift the operations in order to affect a specific transformer.
  Using heterogenous lists (type level functions), a GADT and a corresponding
  type class, this package provides transformers that remove that necessity:
  MultiReaderT/MultiStateT can contain a heterogenous list of values.
  The type inferred for the getter/setter determines which value is
  read/written.
  See the Example application for some very basic usage.
  This package currently lacks a complete set of "lifting instances", i.e.
  instance definitions for classes such as mtl's MonadReader "over" the newly
  introduced monad transformers. These "lifting instances" would be necessary
  to achieve full compatability with existing transformers. Ping me if you
  find anything specific missing.

source-repository head
  type: git
  location: git@github.com:lspitzner/multistate.git

flag build-test
  description: Build the MultiState-test test program
  default: False

flag build-example
  description: Build the MultiState-example example program
  default: False  

library {
  exposed-modules:
    Control.Monad.MultiState
    Control.Monad.MultiReader
  other-modules:
    Data.HList.HList
  build-depends:
    base >=4 && <6,
    mtl >=2 && <3,
    tfp >=0.8,
    transformers == 0.3.*
  extensions:
    GADTs
    TypeFamilies
    MultiParamTypeClasses
    FunctionalDependencies
    FlexibleInstances
    OverlappingInstances
    UndecidableInstances
  ghc-options: -Wall
  hs-source-dirs: src
}

executable multistate-test {
  if flag(build-test) {
    buildable: True
    build-depends:
      multistate,
      base >= 4 && < 6,
      transformers == 0.3.*,
      tfp >=0.8
  } else {
    buildable: False
  }
  ghc-options: -Wall
  main-is: Test.hs
  hs-source-dirs: test
}

executable multistate-example {
  if flag(build-example) {
    buildable: True
    build-depends:
      multistate,
      base >= 4 && < 6,
      transformers == 0.3.*,
      tfp >=0.8,
      mtl >=2 && <3
  } else {
    buildable: False
  }
  main-is: Example.hs
  hs-source-dirs: example
}