cabal-version:      2.4

-- Initial package description 'method.cabal' generated by 'cabal init'.
-- For further documentation, see http://haskell.org/cabal/users-guide/

name:               method
version:            0.3.0.0
synopsis:           rebindable methods for improving testability
description:
  This package provides Method typeclass, which represents 
  monadic functions, and provides easy DSL for mocking/verifying methods.

homepage:           https://github.com/autotaker/method
bug-reports:        https://github.com/autotaker/method/issues
license:            BSD-3-Clause
license-file:       LICENSE
author:             Taku Terao
maintainer:         autotaker@gmail.com

-- copyright:
category:           Control
extra-source-files:
  CHANGELOG.md
  README.md

common shared-properties
  build-depends:
    , base          >=4.13.0.0 && <5.0
    , rio           ^>=0.1.19.0
    , transformers  ^>=0.5.6.2

  default-language: Haskell2010
  ghc-options:
    -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
    -Wmissing-import-lists -Wcompat

common test-depends
  build-depends:      hspec ^>=2.7.4
  build-tool-depends: hspec-discover:hspec-discover ^>=2.7

library
  import:          shared-properties

  -- cabal-fmt:        expand src
  exposed-modules:
    Control.Method
    Control.Method.Internal
    Test.Method
    Test.Method.Behavior
    Test.Method.Dynamic
    Test.Method.Matcher
    Test.Method.Mock
    Test.Method.Monitor
    Test.Method.Monitor.Internal
    Test.Method.Protocol

  -- other-modules:
  -- other-extensions:
  hs-source-dirs:  src

test-suite method-test
  import:           shared-properties, test-depends
  default-language: Haskell2010
  type:             exitcode-stdio-1.0
  hs-source-dirs:   test
  main-is:          Spec.hs

  -- cabal-fmt: expand test -Spec
  other-modules:
    Test.Method.DynamicSpec
    Test.Method.MockSpec
    Test.Method.MonitorSpec
    Test.Method.ProtocolSpec

  build-depends:    method