cabal-version:       3.0
name:                io-classes
version:             1.5.0.0
x-revision: 2
synopsis:            Type classes for concurrency with STM, ST and timing
description:
  IO Monad class hierarchy compatible with
  [io-sim](https://hackage.haskell.org/package/io-sim),
  [base](https://hackage.haskell.org/package/base),
  [async](https://hackage.haskell.org/package/async),
  [stm](https://hackage.haskell.org/package/stm),
  [exceptions](https://hackage.haskell.org/package/exceptions) &
  [time](https://hackage.haskell.org/package/time) packages.
license:             Apache-2.0
license-files:       LICENSE NOTICE
copyright:           2019-2024 Input Output Global Inc (IOG)
author:              Alexander Vieth, Duncan Coutts, Marcin Szamotulski, Thomas Winant
maintainer:          Duncan Coutts duncan@well-typed.com, Marcin Szamotulski coot@coot.me
category:            Control
build-type:          Simple
extra-doc-files:     CHANGELOG.md README.md
bug-reports:         https://github.com/input-output-hk/io-sim/issues
tested-with:         GHC == { 8.10, 9.2, 9.4, 9.6, 9.8, 9.10 }

source-repository head
  type:     git
  location: https://github.com/input-output-hk/io-sim
  subdir:   io-classes

flag asserts
  description: Enable assertions
  manual:      False
  default:     False

common warnings
    ghc-options: -Wall
                 -Wcompat
                 -Wincomplete-uni-patterns
                 -Wincomplete-record-updates
                 -Wpartial-fields
                 -Widentities
                 -Wunused-packages
                 -Wno-redundant-constraints
                 -Wno-unticked-promoted-constructors

library
  import:              warnings
  hs-source-dirs:      src

  -- At this experiment/prototype stage everything is exposed.
  -- This has to be tidied up once the design becomes clear.
  exposed-modules:     Control.Concurrent.Class.MonadMVar
                       Control.Concurrent.Class.MonadSTM
                       Control.Concurrent.Class.MonadSTM.TArray
                       Control.Concurrent.Class.MonadSTM.TBQueue
                       Control.Concurrent.Class.MonadSTM.TChan
                       Control.Concurrent.Class.MonadSTM.TMVar
                       Control.Concurrent.Class.MonadSTM.TQueue
                       Control.Concurrent.Class.MonadSTM.TSem
                       Control.Concurrent.Class.MonadSTM.TVar
                       Control.Monad.Class.MonadAsync
                       Control.Monad.Class.MonadEventlog
                       Control.Monad.Class.MonadFork
                       Control.Monad.Class.MonadSay
                       Control.Monad.Class.MonadST
                       Control.Monad.Class.MonadSTM
                       Control.Monad.Class.MonadSTM.Internal
                       Control.Monad.Class.MonadThrow
                       Control.Monad.Class.MonadTime
                       Control.Monad.Class.MonadTimer
                       Control.Monad.Class.MonadTest
  default-language:    Haskell2010
  default-extensions:  ImportQualifiedPost
  other-extensions:    CPP
                       DataKinds
                       DefaultSignatures
                       DeriveFunctor
                       DeriveGeneric
                       DerivingStrategies
                       ExistentialQuantification
                       ExplicitNamespaces
                       FlexibleContexts
                       FlexibleInstances
                       FunctionalDependencies
                       GADTs
                       GeneralisedNewtypeDeriving
                       MultiParamTypeClasses
                       NamedFieldPuns
                       QuantifiedConstraints
                       RankNTypes
                       ScopedTypeVariables
                       StandaloneDeriving
                       TypeFamilies
                       TypeFamilyDependencies
                       TypeOperators
                       UndecidableInstances
  build-depends:       base  >=4.9 && <4.22,
                       array,
                       async >=2.1,
                       bytestring,
                       mtl   >=2.2 && <2.4,
                       primitive >= 0.7 && <0.11,
                       stm   >=2.5 && <2.5.2 || >=2.5.3 && <2.6,
                       time  >=1.9.1 && <1.13
  if impl(ghc >= 9.10)
    build-depends:     ghc-internal

  if flag(asserts)
    ghc-options: -fno-ignore-asserts