cabal-version:       2.2

name:                fused-effects
version:             0.5.0.1
synopsis:            A fast, flexible, fused effect system.
description:         A fast, flexible, fused effect system, à la Effect Handlers in Scope, Monad Transformers and Modular Algebraic Effects: What Binds Them Together, and Fusion for Free—Efficient Algebraic Effect Handlers.
homepage:            https://github.com/fused-effects/fused-effects
license:             BSD-3-Clause
license-file:        LICENSE
author:              Nicolas Wu, Tom Schrijvers, Rob Rix, Patrick Thomson
maintainer:          robrix@github.com
copyright:           2018-2019 Nicolas Wu, Tom Schrijvers, Rob Rix, Patrick Thomson
category:            Control
build-type:          Simple
extra-source-files:
  README.md
  ChangeLog.md

tested-with:         GHC == 8.2.2
                   , GHC == 8.4.4
                   , GHC == 8.6.2
                   , GHC == 8.8.1

common common
  default-language:    Haskell2010
  ghc-options:         -Weverything -Wno-missing-local-signatures -Wno-missing-import-lists -Wno-implicit-prelude -Wno-safe -Wno-unsafe -Wno-name-shadowing -Wno-monomorphism-restriction -Wno-missed-specialisations -Wno-all-missed-specialisations
  if (impl(ghc >= 8.6))
    ghc-options:       -Wno-star-is-type
  if (impl(ghc >= 8.8))
    ghc-options:       -Wno-missing-deriving-strategies

library
  import:              common
  exposed-modules:     Control.Effect
                     , Control.Effect.Carrier
                     , Control.Effect.Cull
                     , Control.Effect.Cut
                     , Control.Effect.Error
                     , Control.Effect.Fail
                     , Control.Effect.Fresh
                     , Control.Effect.Interpose
                     , Control.Effect.Interpret
                     , Control.Effect.Lift
                     , Control.Effect.NonDet
                     , Control.Effect.Pure
                     , Control.Effect.Random
                     , Control.Effect.Reader
                     , Control.Effect.Resource
                     , Control.Effect.Resumable
                     , Control.Effect.State
                     , Control.Effect.State.Internal
                     , Control.Effect.State.Lazy
                     , Control.Effect.State.Strict
                     , Control.Effect.Sum
                     , Control.Effect.Trace
                     , Control.Effect.Writer
  build-depends:       base           >= 4.9 && < 4.14
                     , deepseq       ^>= 1.4.3
                     , MonadRandom   ^>= 0.5
                     , unliftio-core ^>= 0.1.2
                     , random
                     , transformers
  hs-source-dirs:      src


test-suite examples
  import:              common
  type:                exitcode-stdio-1.0
  main-is:             Main.hs
  other-modules:       Parser
                     , ReinterpretLog
                     , Teletype
  build-depends:       base        >= 4.9 && < 4.14
                     , fused-effects
                     , hspec       >= 2.4.1
                     , QuickCheck  >= 2.7 && < 3
                     , transformers
  hs-source-dirs:      examples

test-suite test
  import:              common
  type:                exitcode-stdio-1.0
  main-is:             Spec.hs
  other-modules:       Control.Effect.Spec
                     , Control.Effect.NonDet.Spec
  build-depends:       base                >= 4.9 && < 4.14
                     , fused-effects
                     , hspec               >= 2.4.1
                     , inspection-testing ^>= 0.4
  hs-source-dirs:      test

test-suite doctest
  import:              common
  type:                exitcode-stdio-1.0
  main-is:             Doctest.hs
  build-depends:       base     >= 4.9 && < 4.14
                     , doctest  >= 0.7 && < 1
                     , fused-effects
  hs-source-dirs:      test


benchmark benchmark
  import:             common
  type:               exitcode-stdio-1.0
  main-is:            Bench.hs
  build-depends:      base >= 4.9 && < 4.14
                    , fused-effects
                    , gauge
  hs-source-dirs:     benchmark
  ghc-options:        -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m"


source-repository head
  type:     git
  location: https://github.com/fused-effects/fused-effects