packages feed

transformers-compat-0.8: transformers-compat.cabal

name:          transformers-compat
category:      Compatibility
version:       0.8
license:       BSD3
cabal-version: >= 1.10
license-file:  LICENSE
author:        Edward A. Kmett
maintainer:    Edward A. Kmett <ekmett@gmail.com>
stability:     provisional
homepage:      https://github.com/ekmett/transformers-compat/
bug-reports:   https://github.com/ekmett/transformers-compat/issues
copyright:     Copyright (C) 2012-2015 Edward A. Kmett
synopsis:      A small compatibility shim for the transformers library
description:
  This package includes backported versions of types that were added to
  @transformers@ in @transformers-0.5@ for users who need strict
  @transformers-0.5@ compatibility, but also need those types.
  .
  Those users should be able to just depend on @transformers >= 0.5@ and
  @transformers-compat >= 0.7.3@.
  .
  Note: missing methods are not supplied, but this at least permits the types to be used.

build-type:    Simple
tested-with:   GHC == 8.0.2
             , GHC == 8.2.2
             , GHC == 8.4.4
             , GHC == 8.6.5
             , GHC == 8.8.4
             , GHC == 8.10.7
             , GHC == 9.0.2
             , GHC == 9.2.8
             , GHC == 9.4.8
             , GHC == 9.6.7
             , GHC == 9.8.4
             , GHC == 9.10.3
             , GHC == 9.12.2
             , GHC == 9.14.1
extra-source-files:
  .ghci
  .gitignore
  .hlint.yaml
  .vim.custom
  config
  tests/*.hs
  tests/LICENSE
  tests/transformers-compat-tests.cabal
  README.markdown
  CHANGELOG.markdown

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

flag five
  default: False
  manual: False
  description: Use transformers 0.5 up until (but not including) 0.5.3. This will be selected by cabal picking the appropriate version.

flag five-three
  default: True
  manual: False
  description: Use transformers 0.5.3. This will be selected by cabal picking the appropriate version.

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`.

flag generic-deriving
  default: True
  manual: True
  description: -f-generic-deriving prevents generic-deriving from being built as a dependency.
               This disables certain aspects of generics for older versions of GHC. In particular,
               Generic(1) instances will not be backported prior to GHC 7.2, and generic operations
               over unlifted types will not be backported prior to GHC 8.0. This is an unsupported
               configuration.

library
  build-depends:
    base >= 4.9 && < 5,
    -- These are all transformers versions we support.
    -- each flag below splits this interval into two parts.
    -- flag-true parts are mutually exclusive, so at least one have to be on.
    transformers >= 0.5 && <0.7

  hs-source-dirs:
    src

  exposed-modules:
    Control.Monad.Trans.Instances

  other-modules:
    Paths_transformers_compat

  default-language:
    Haskell2010

  -- automatic flags
  if flag(five-three)
    build-depends: transformers >= 0.5.3
  else
    build-depends: transformers < 0.5.3

  if flag(five)
    hs-source-dirs: 0.5
    build-depends: transformers >= 0.5 && < 0.5.3
  else
    build-depends: transformers >= 0.5.3

  -- other flags
  if impl(ghc) && flag(generic-deriving)
    hs-source-dirs: generics
    exposed-modules:
      Data.Functor.Classes.Generic
      Data.Functor.Classes.Generic.Internal

  if flag(mtl)
    cpp-options: -DMTL

  if !flag(mtl) && !flag(generic-deriving)
    cpp-options: -DHASKELL98

  if flag(five)
    exposed-modules:
      Control.Monad.Trans.Accum
      Control.Monad.Trans.Select