name:          transformers-compat
category:      Compatibility
version:       0.4.0.4
license:       BSD3
cabal-version: >= 1.8
license-file:  LICENSE
author:        Edward A. Kmett
maintainer:    Edward A. Kmett <ekmett@gmail.com>
stability:     provisional
homepage:      http://github.com/ekmett/transformers-compat/
bug-reports:   http://github.com/ekmett/transformers-compat/issues
copyright:     Copyright (C) 2012 Edward A. Kmett
synopsis:      A small compatibility shim exposing the new types from transformers 0.3 and 0.4 to older Haskell platforms.
description:
  This package includes backported versions of types that were added
  to transformers in transformers 0.3 and 0.4 for users who need strict
  transformers 0.2 or 0.3 compatibility to run on old versions of the
  platform, but also need those types.
  .
  Those users should be able to just depend on @transformers >= 0.2@
  and @transformers-compat >= 0.3@.
  .
  Note: missing methods are not supplied, but this at least permits the types to be used.

build-type:    Simple
tested-with:   GHC == 7.0.4, GHC == 7.4.1, GHC == 7.4.2, GHC == 7.6.1, GHC == 7.8.2
extra-source-files:
  .travis.yml
  .ghci
  .gitignore
  .vim.custom
  config
  HLint.hs
  README.markdown
  CHANGELOG.markdown

source-repository head
  type: git
  location: git://github.com/ekmett/transformers-compat.git

flag two
  default: False
  description: Use transformers 0.2. This must be selected manually and should
    probably only be used on older GHCs around 7.0.x.
  manual: True

flag three
  default: False
  manual: True
  description: Use transformers 0.3. This should toggle on/off automatically.

flag mtl
  default: True
  manual: True
  description: -f-mtl Disables support for mtl for transformers 0.2 and 0.3. That is an unsupported configuration, and results in missing instances for `ExceptT`, but keeps the package Haskell 98.

library
  build-depends:
    base >= 4.3 && < 5

  other-modules:
    Paths_transformers_compat

  if flag(three)
    hs-source-dirs: 0.3
    build-depends:
      transformers >= 0.3 && < 0.4,
      mtl >= 2.1 && < 2.2
  else
    if flag(two)
      hs-source-dirs: 0.2 0.3
      build-depends:
        transformers >= 0.2 && < 0.3,
        mtl >= 2.0 && < 2.1
    else
      build-depends: transformers >= 0.4.1 && < 0.5

  if !flag(mtl)
    cpp-options: -DHASKELL98

  if flag(two)
    exposed-modules:
      Control.Applicative.Backwards
      Control.Applicative.Lift
      Data.Functor.Reverse

  if flag(two) || flag(three)
    exposed-modules:
      Control.Monad.Trans.Except
      Control.Monad.Signatures
      Data.Functor.Classes
      Data.Functor.Sum
