cabal-version: 2.2

name: either-result
version: 0.2.0.0
synopsis: ‘Result a’ is a wrapper of ‘Either String a’.
description: ‘Result a’ is a wrapper of ‘Either String a’, but ‘Result’ is an instance of ‘MonadFail’.
homepage: https://github.com/kakkun61/either-result
bug-reports: https://github.com/kakkun61/either-result/issues
license: Apache-2.0
license-file: LICENSE
author: Kazuki Okamoto (岡本和樹)
maintainer: kazuki.okamoto@kakkun61.com
copyright: 2020 Kazuki Okamoto (岡本和樹)
category: Data
build-type: Simple
tested-with: GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1
extra-source-files: README.md,
                    CHANGELOG.md

common common
  build-depends: base >= 4 && < 5
  ghc-options: -Wall
               -Wcompat
  default-language: Haskell2010

library
  import: common
  hs-source-dirs: src
  exposed-modules: Data.Either.Result,
                   Control.Monad.Trans.Except.Result,
                   Control.Monad.Trans.Result,
                   Control.Monad.Result
  build-depends: transformers,
                 mtl
  ghc-options: -Wincomplete-uni-patterns
               -Wincomplete-record-updates
               -Wmonomorphism-restriction
               -Wmissing-exported-signatures
               -Wmissing-export-lists
               -Wmissing-home-modules
               -Wmissing-import-lists
               -Widentities
               -Wredundant-constraints
               -Wpartial-fields
               -Wno-name-shadowing

test-suite doctest
  import: common
  type: exitcode-stdio-1.0
  main-is: main.hs
  hs-source-dirs: doctest
  build-depends: either-result,
                 doctest
  ghc-options: -threaded
               -rtsopts
               -with-rtsopts=-N
  build-tool-depends: doctest-discover:doctest-discover

test-suite spec
  import: common
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  hs-source-dirs: spec
  other-modules: Control.Monad.Trans.Except.ResultSpec,
                 Control.Monad.Trans.ResultSpec,
                 Control.Monad.ResultSpec
  build-depends: either-result,
                 hspec,
                 transformers
  ghc-options: -threaded
               -rtsopts
               -with-rtsopts=-N
  build-tool-depends: hspec-discover:hspec-discover