packages feed

effectful-2.5.0.0: effectful.cabal

cabal-version:      3.0
build-type:         Simple
name:               effectful
version:            2.5.0.0
license:            BSD-3-Clause
license-file:       LICENSE
category:           Control
maintainer:         andrzej@rybczak.net
author:             Andrzej Rybczak
synopsis:           An easy to use, performant extensible effects library.

description:
  An easy to use, performant extensible effects library with seamless
  integration with the existing Haskell ecosystem.
  .
  This is the "batteries-included" variant. See the
  @<https://hackage.haskell.org/package/effectful-core effectful-core>@ package
  if you need a more limited dependency footprint or want to browse
  documentation of core modules.

extra-source-files:
  CHANGELOG.md
  README.md

tested-with: GHC == { 8.10.7, 9.0.2, 9.2.8, 9.4.8, 9.6.5, 9.8.2, 9.10.1 }

bug-reports:   https://github.com/haskell-effectful/effectful/issues
source-repository head
  type:     git
  location: https://github.com/haskell-effectful/effectful.git

flag benchmark-foreign-libraries
    description: Include other effect libraries in the benchmarks.
    default: False

common language
    ghc-options:        -Wall
                        -Wcompat
                        -Wno-unticked-promoted-constructors
                        -Wmissing-deriving-strategies
                        -Werror=prepositive-qualified-module

    default-language:   Haskell2010

    default-extensions: BangPatterns
                        ConstraintKinds
                        DataKinds
                        DeriveFunctor
                        DeriveGeneric
                        DerivingStrategies
                        FlexibleContexts
                        FlexibleInstances
                        GADTs
                        GeneralizedNewtypeDeriving
                        ImportQualifiedPost
                        LambdaCase
                        MultiParamTypeClasses
                        NoStarIsType
                        PolyKinds
                        RankNTypes
                        RecordWildCards
                        RoleAnnotations
                        ScopedTypeVariables
                        StandaloneDeriving
                        TupleSections
                        TypeApplications
                        TypeFamilies
                        TypeOperators

library
    import:         language

    build-depends:    base                >= 4.14      && < 5
                    , async               >= 2.2.2
                    , bytestring          >= 0.10
                    , directory           >= 1.3.2
                    , effectful-core      >= 2.5.0.0   && < 2.5.1.0
                    , process             >= 1.6.9
                    , strict-mutable-base >= 1.1.0.0
                    , time                >= 1.9.2
                    , stm                 >= 2.5.0.0
                    , unliftio            >= 0.2.20

    hs-source-dirs:  src

    exposed-modules: Effectful.Concurrent
                     Effectful.Concurrent.Async
                     Effectful.Concurrent.Chan
                     Effectful.Concurrent.Chan.Strict
                     Effectful.Concurrent.MVar
                     Effectful.Concurrent.MVar.Strict
                     Effectful.Concurrent.MVar.Strict.Compat
                     Effectful.Concurrent.STM
                     Effectful.Concurrent.QSem
                     Effectful.Concurrent.QSemN
                     Effectful.Console.ByteString
                     Effectful.Console.ByteString.Lazy
                     Effectful.Environment
                     Effectful.FileSystem
                     Effectful.FileSystem.IO
                     Effectful.FileSystem.IO.ByteString
                     Effectful.FileSystem.IO.ByteString.Builder
                     Effectful.FileSystem.IO.ByteString.Lazy
                     Effectful.FileSystem.IO.File
                     Effectful.Prim.IORef
                     Effectful.Prim.IORef.Strict
                     Effectful.Process
                     Effectful.Temporary
                     Effectful.Timeout

    other-modules:   Effectful.Concurrent.Effect
                     Effectful.Console.Effect
                     Effectful.FileSystem.Effect

    reexported-modules:    Effectful
                         , Effectful.Dispatch.Dynamic
                         , Effectful.Dispatch.Static
                         , Effectful.Error.Static
                         , Effectful.Error.Dynamic
                         , Effectful.Exception
                         , Effectful.Fail
                         , Effectful.Labeled
                         , Effectful.Labeled.Error
                         , Effectful.Labeled.Reader
                         , Effectful.Labeled.State
                         , Effectful.Labeled.Writer
                         , Effectful.NonDet
                         , Effectful.Prim
                         , Effectful.Provider
                         , Effectful.Provider.List
                         , Effectful.Reader.Dynamic
                         , Effectful.Reader.Static
                         , Effectful.State.Dynamic
                         , Effectful.State.Static.Local
                         , Effectful.State.Static.Shared
                         , Effectful.Writer.Dynamic
                         , Effectful.Writer.Static.Local
                         , Effectful.Writer.Static.Shared

test-suite test
    import:         language

    ghc-options:    -threaded -rtsopts -with-rtsopts=-N4

    build-depends:    base
                    , containers
                    , effectful
                    , effectful-core
                    , exceptions
                    , lifted-base
                    , primitive
                    , safe-exceptions
                    , strict-mutable-base
                    , tasty
                    , tasty-hunit
                    , unliftio

    hs-source-dirs: tests

    type:           exitcode-stdio-1.0
    main-is:        Main.hs

    other-modules:  AsyncTests
                    ConcurrencyTests
                    EnvTests
                    EnvironmentTests
                    ErrorTests
                    LabeledTests
                    NonDetTests
                    PrimTests
                    ReaderTests
                    StateTests
                    TimeoutTests
                    UnliftTests
                    Utils

benchmark bench
    import:         language

    ghc-options:    -threaded -rtsopts -with-rtsopts=-T

    if flag(benchmark-foreign-libraries)
       build-depends: mtl

       if impl(ghc < 9.9)
          build-depends: cleff >= 0.3.3.0

       if impl(ghc < 9.9)
          build-depends: freer-simple >= 1.2.1.2

       if impl(ghc < 9.11)
          build-depends: fused-effects >= 1.1.2.2

       if impl(ghc < 9.11)
          build-depends: polysemy >= 1.9.2.0

    build-depends:    base
                    , async
                    , effectful
                    , tasty-bench
                    , unix
                    , unliftio
                    , text

    hs-source-dirs: bench

    type:           exitcode-stdio-1.0
    main-is:        Main.hs

    other-modules:  Concurrency
                    Countdown
                    FileSizes
                    Unlift
                    Utils