packages feed

io-sim-1.0.0.0: io-sim.cabal

cabal-version:       3.0
name:                io-sim
version:             1.0.0.0
synopsis:            A pure simulator for monadic concurrency with STM.
description:
  A pure simulator monad with support of concurency (base, async), stm,
  synchronous and asynchronous exceptions, timeouts & delays, dynamic traces,
  and more.
license:             Apache-2.0
license-files:
  LICENSE
  NOTICE
copyright:           2022-2023 Input Output Global Inc (IOG)
author:              Alexander Vieth, Duncan Coutts, John Hughes, Marcin Szamotulski
maintainer:          Duncan Coutts duncan@well-typed.com, Marcin Szamotulski coot@coot.me
category:            Testing
build-type:          Simple
extra-source-files:  CHANGELOG.md
                     README.md
tested-with:         GHC == { 8.10, 9.2, 9.4 }

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

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

common test-warnings
    ghc-options: -Wall
                 -Wcompat
                 -Wincomplete-uni-patterns
                 -Widentities
                 -Wunused-packages
                 -Wredundant-constraints
                 -Wno-unticked-promoted-constructors

common warnings
    import:       test-warnings
    ghc-options: -Wincomplete-record-updates
                 -Wpartial-fields

library
  import:              warnings
  hs-source-dirs:      src
  exposed-modules:     Data.List.Trace,
                       Control.Monad.IOSim
  other-modules:       Control.Monad.IOSim.CommonTypes,
                       Control.Monad.IOSim.Types,
                       Control.Monad.IOSim.Internal,
                       Control.Monad.IOSim.InternalTypes,
                       Control.Monad.IOSim.STM,
                       Control.Monad.IOSimPOR.Internal,
                       Control.Monad.IOSimPOR.Types,
                       Control.Monad.IOSimPOR.QuickCheckUtils,
                       Control.Monad.IOSimPOR.Timeout
  default-language:    Haskell2010
  other-extensions:    BangPatterns,
                       CPP,
                       DeriveFunctor,
                       DeriveGeneric,
                       DerivingVia,
                       ExistentialQuantification,
                       ExplicitNamespaces,
                       FlexibleContexts,
                       FlexibleInstances,
                       GADTSyntax,
                       GeneralizedNewtypeDeriving,
                       MultiParamTypeClasses,
                       NamedFieldPuns,
                       NumericUnderscores,
                       RankNTypes,
                       ScopedTypeVariables,
                       TypeFamilies
  build-depends:       base              >=4.9 && <4.18,
                       io-classes       ^>=1.0,
                       exceptions        >=0.10,
                       containers,
                       deque,
                       nothunks,
                       parallel,
                       psqueues          >=0.2 && <0.3,
                       strict-stm       ^>=1.0,
                       si-timers        ^>=1.0,
                       time              >=1.9.1 && <1.13,
                       quiet,
                       QuickCheck,


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

test-suite test
  import:              test-warnings
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Main.hs
  other-modules:       Test.Control.Monad.STM
                       Test.Control.Monad.Utils
                       Test.Control.Monad.IOSim
                       Test.Control.Monad.IOSimPOR
                       Test.Control.Monad.Class.MonadMVar
  default-language:    Haskell2010
  build-depends:       base,
                       array,
                       containers,
                       io-classes,
                       io-sim,
                       parallel,
                       QuickCheck,
                       si-timers,
                       strict-stm,
                       tasty,
                       tasty-quickcheck,
                       tasty-hunit,
                       time
  ghc-options:         -fno-ignore-asserts

benchmark bench
  import:              warnings
  type:                exitcode-stdio-1.0
  hs-source-dirs:      bench
  main-is:             Main.hs
  default-language:    Haskell2010
  build-depends:       base,
                       criterion,

                       io-classes,
                       io-sim,
  ghc-options:         -Wall
                       -Wcompat
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wpartial-fields
                       -Widentities
                       -Wredundant-constraints