packages feed

monad-throw-exit-0.1.0.0: monad-throw-exit.cabal

cabal-version:       2.4
name:                monad-throw-exit
version:             0.1.0.0
synopsis:            Functions to exit the program anywhere in MonadThrow monads.
-- description:
homepage:            https://github.com/igrep/monad-throw-exit
license:             Apache-2.0
license-file:        LICENSE
author:              YAMAMOTO Yuji
maintainer:          igrep@n.email.ne.jp
copyright:           2021 YAMAMOTO Yuji
category:            System
build-type:          Simple
extra-source-files:  README.md

common common
  build-depends:       base >= 4.7 && < 5
  default-language:    Haskell2010

common common-executable
  build-depends:       monad-throw-exit
  ghc-options:         -threaded -rtsopts

library
  import:              common
  hs-source-dirs:      src
  exposed-modules:     System.Exit.MonadThrow
  build-depends:       exceptions >= 0.10.4

flag build-example-command
  description: Build a CLI client for testing.
  default:     False
  manual:      True

executable monad-throw-exit-example-command
  import:              common, common-executable
  if flag(build-example-command)
    buildable: True
  else
    buildable: False
  hs-source-dirs:      app
  main-is:             example.hs

test-suite monad-throw-exit-test
  import:              common, common-executable
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  build-depends:       monad-throw-exit
                     , hspec >= 2.7.10
                     , QuickCheck >= 2.14.2
                     , typed-process >= 0.2.7
  build-tool-depends: monad-throw-exit:monad-throw-exit-example-command