Name:               tagged-exception-core
Version:            2.2.0.0

Synopsis:           Reflect exceptions using phantom types.
Description:
  This library provides interface similar to /extensible-exceptions/.  It
  introduces @Throws@ monad transformer that uses phantom type to tag code that
  may raise exception.  Intention is to make exceptions explicit and to enforce
  exception handling.

Homepage:           https://github.com/trskop/tagged-exception-core
Bug-reports:        https://github.com/trskop/tagged-exception-core/issues
Copyright:          Copyright (c) 2009-2016, Peter Trško
License:            BSD3
License-file:       LICENSE
Author:             Peter Trško
Maintainer:         peter.trsko@gmail.com
Category:
    Control
  , Error Handling
  , Exceptions
  , Failure
  , Monad
  , Monads
  , Phantom Types

Build-type:         Simple
Cabal-version:      >= 1.10
-- Tested-with:

Extra-source-files:
    ChangeLog.md
  , README.md

Flag pedantic
  Description:      Pass additional flags to GHC.
  Default:          False
  Manual:           True

Library
  Hs-source-dirs:   src
  Exposed-modules:
      Control.Monad.TaggedException
    , Control.Monad.TaggedException.Core
    , Control.Monad.TaggedException.Hidden
    , Control.Monad.TaggedException.Internal.Throws
    , Control.Monad.TaggedException.Unsafe
    , Control.Monad.TaggedException.Utilities

  Default-language: Haskell2010
  Other-extensions:
      CPP
    , DeriveDataTypeable
    , DeriveGeneric
    , FlexibleInstances
    , MultiParamTypeClasses
    , NoImplicitPrelude
    , PolyKinds
    , RankNTypes
    , UndecidableInstances

  Build-depends:
    -- {{{ Distributed with GHC or Haskell Platform ---------------------------

      base >= 4.5 && < 5
    -- ^ Same restrictions as exceptions 0.6 have.

    , transformers >= 0.3 && < 0.6
    -- ^ Based on dependencies of mtl==2.1 and mtl==2.2.1

    -- }}} Distributed with GHC or Haskell Platform ---------------------------

    , exceptions > 0.6 && < 0.9
    -- ^ Interface of this package changed a lot between minor versions,
    -- therefore trying conservative approach. Dependency introduced in
    -- tagged-exception-core-2.0.0.0.
    --
    -- From the used API view, there has been little changes between 0.6.1 and
    -- 0.8.2.1 (newest at the time of writing).

    , mmorph >= 1.0.0 && < 1.1
    -- ^ Dependency introduced in tagged-exception-core-1.2.0.0.

    , mtl >=2.1 && <2.3
    -- ^ Dependency introduced in tagged-exception-core-2.0.1.0.
    -- Package exceptions already depends on it so it doesn't make sense to
    -- avoid defining instances for mtl classes.

  if impl(ghc >= 7.8.1)
    CPP-options:    -DKIND_POLYMORPHIC_TYPEABLE

  CPP-options:      -DGHC_GENERICS
  if impl(ghc < 7.6)
    -- GHC.Generics moved from ghc-prim to base with GHC 7.6 release.
    Build-depends:  ghc-prim

  GHC-options:      -Wall
  if flag(pedantic)
    GHC-options:
      -fwarn-tabs
      -fwarn-implicit-prelude
      -fwarn-missing-import-lists
--    -Werror

source-repository head
  type:             git
  location:         git://github.com/trskop/tagged-exception-core.git

source-repository this
  type:             git
  location:         git://github.com/trskop/tagged-exception-core.git
  tag:              2.2.0.0