cabal-version:       2.2

name:                fused-effects
version:             1.1.0.0
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-2020 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.5
  GHC == 8.8.3
  GHC == 8.10.1

common common
  default-language: Haskell2010
  ghc-options:
    -Weverything
    -Wno-all-missed-specialisations
    -Wno-implicit-prelude
    -Wno-missed-specialisations
    -Wno-missing-import-lists
    -Wno-missing-local-signatures
    -Wno-monomorphism-restriction
    -Wno-name-shadowing
    -Wno-safe
    -Wno-unsafe
  if (impl(ghc >= 8.8))
    ghc-options: -Wno-missing-deriving-strategies
  if (impl(ghc >= 8.10))
    ghc-options:
      -Wno-missing-safe-haskell-mode
      -Wno-prepositive-qualified-module

library
  import:         common
  hs-source-dirs: src
  exposed-modules:
    Control.Algebra
    Control.Algebra.Handler
    -- Carriers
    Control.Carrier.Choose.Church
    Control.Carrier.Cull.Church
    Control.Carrier.Cut.Church
    Control.Carrier.Empty.Church
    Control.Carrier.Empty.Maybe
    Control.Carrier.Error.Church
    Control.Carrier.Error.Either
    Control.Carrier.Fail.Either
    Control.Carrier.Fresh.Church
    Control.Carrier.Fresh.Strict
    Control.Carrier.Interpret
    Control.Carrier.Lift
    Control.Carrier.NonDet.Church
    Control.Carrier.Reader
    Control.Carrier.State.Church
    Control.Carrier.State.Lazy
    Control.Carrier.State.Strict
    Control.Carrier.Throw.Either
    Control.Carrier.Trace.Ignoring
    Control.Carrier.Trace.Printing
    Control.Carrier.Trace.Returning
    Control.Carrier.Writer.Church
    Control.Carrier.Writer.Strict
    -- Effects
    Control.Effect.Catch
    Control.Effect.Choose
    Control.Effect.Cull
    Control.Effect.Cut
    Control.Effect.Empty
    Control.Effect.Error
    Control.Effect.Fail
    Control.Effect.Fresh
    Control.Effect.Labelled
    Control.Effect.Lift
    Control.Effect.NonDet
    Control.Effect.Reader
    Control.Effect.Reader.Labelled
    Control.Effect.State
    Control.Effect.State.Labelled
    Control.Effect.Sum
    Control.Effect.Throw
    Control.Effect.Trace
    Control.Effect.Writer
  other-modules:
    Control.Effect.Catch.Internal
    Control.Effect.Choose.Internal
    Control.Effect.Empty.Internal
    Control.Effect.Error.Internal
    Control.Effect.Lift.Internal
    Control.Effect.NonDet.Internal
    Control.Effect.Reader.Internal
    Control.Effect.State.Internal
    Control.Effect.Throw.Internal
    Control.Effect.Writer.Internal
  build-depends:
      base          >= 4.9 && < 4.15
    , transformers  >= 0.4 && < 0.6


test-suite examples
  import:         common
  type:           exitcode-stdio-1.0
  hs-source-dirs: examples
  main-is:        Main.hs
  other-modules:
    Inference
    Labelled
    Parser
    ReinterpretLog
    Teletype
  build-depends:
    , base
    , fused-effects
    , hedgehog           ^>= 1
    , hedgehog-fn        ^>= 1
    , tasty              ^>= 1.2
    , tasty-hedgehog     ^>= 1
    , tasty-hunit        ^>= 0.10


test-suite test
  import:         common
  type:           exitcode-stdio-1.0
  hs-source-dirs: test
  main-is:        Test.hs
  other-modules:
    Catch
    Choose
    Cull
    Cut
    Cut.Church
    Empty
    Error
    Fail
    Fresh
    Fusion
    Gen
    Lift
    Monad
    MonadFix
    NonDet
    NonDet.Church
    Reader
    State
    Throw
    Writer
  build-depends:
    , base
    , containers          >= 0.5 && < 0.7
    , fused-effects
    , hedgehog           ^>= 1
    , hedgehog-fn        ^>= 1
    , inspection-testing ^>= 0.4
    , tasty              ^>= 1.2
    , tasty-hedgehog     ^>= 1
    , tasty-hunit        ^>= 0.10
    , transformers


test-suite docs
  import:      common
  type:        exitcode-stdio-1.0
  main-is:     README.lhs
  ghc-options: -pgmL markdown-unlit
  build-depends:
    , base
    , fused-effects
  build-tool-depends:
      markdown-unlit:markdown-unlit ^>= 0.5


benchmark benchmark
  import:         common
  type:           exitcode-stdio-1.0
  hs-source-dirs: benchmark
  main-is:        Bench.hs
  other-modules:
    Bench.Error
    Bench.Interpret
    Bench.NonDet
    Bench.NonDet.NQueens
    Bench.Reader
    Bench.State
    Bench.Writer
  build-depends:
    , base
    , fused-effects
    , gauge
    , transformers
  ghc-options:
    -threaded
    -rtsopts "-with-rtsopts=-N -A4m -n2m"


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