packages feed

acid-state-0.16.1.4: acid-state.cabal

Cabal-version:       1.18
Name:                acid-state
Version:             0.16.1.4
Synopsis:            Add ACID guarantees to any serializable Haskell data structure.
Description:         Use regular Haskell data structures as your database and get stronger ACID guarantees than most RDBMS offer.
Homepage:            https://github.com/acid-state/acid-state
License:             PublicDomain
Author:              David Himmelstrup
Maintainer:          Lemmih <lemmih@gmail.com>
-- Copyright:
Category:            Database
Build-type:          Simple

tested-with:
  GHC == 9.14.1
  GHC == 9.12.2
  GHC == 9.10.2
  GHC == 9.8.4
  GHC == 9.6.7
  GHC == 9.4.8
  GHC == 9.2.8
  GHC == 9.0.2
  GHC == 8.10.7
  GHC == 8.8.4
  GHC == 8.6.5
  GHC == 8.4.4
  GHC == 8.2.2
  -- cabal-3.12 cannot install dependency system-filepath any more in the GHC 8.0 environment
  -- https://github.com/haskell/cabal/issues/10379
  -- GHC == 8.0.2

Extra-doc-files:
        CHANGELOG.md
Extra-source-files:
        test-state/OldStateTest1/*.log
        test-state/OldStateTest1/*.version
        test-state/OldStateTest2/*.log
        test-state/OldStateTest2/*.version
        test-state/OldStateTest3/*.log
        test-state/OldStateTest3/*.version

Source-repository head
  type:          git
  location:      https://github.com/acid-state/acid-state

flag skip-state-machine-test
  description: If enabled, do not build/run the state-machine test
  default: False
  manual: False

Library
  Exposed-Modules:     Data.Acid
                       Data.Acid.Archive
                       Data.Acid.Common
                       Data.Acid.Local Data.Acid.Memory
                       Data.Acid.Memory.Pure Data.Acid.Remote
                       Data.Acid.Advanced
                       Data.Acid.Log Data.Acid.CRC
                       Data.Acid.Abstract Data.Acid.Core
                       Data.Acid.TemplateHaskell
                       Data.Acid.Repair

  Other-modules:       Paths_acid_state
                       FileIO

  -- Lower bounds taken from GHC 8.0 / LTS 7.0
  Build-depends:       array             >= 0.5.1.1
                     , base              >= 4.9        && < 5
                     , bytestring        >= 0.10.8.0
                     , cereal            >= 0.5.3.0
                     , containers        >= 0.5.7.1
                     , safecopy          >= 0.6        && < 0.11
                     , stm               >= 2.4
                     , directory         >= 1.2.6.2
                     , filelock          >= 0.1.0.1
                     , filepath          >= 1.4.1.0
                     , mtl               >= 2.2.1
                     , network           >= 2.6.3.1    && < 3.3
                     , network-bsd
                     , template-haskell  >= 2.11.0.0   && < 2.25
                     , th-expand-syns    >= 0.4.0.0

  if os(windows)
     Build-depends:       Win32          >= 2.3.1.1
  else
     Build-depends:       unix           >= 2.7.2.0

  Hs-Source-Dirs:      src/

  if os(windows)
     Hs-Source-Dirs:   src-win32/
  else
     Hs-Source-Dirs:   src-unix/

  default-language:    Haskell2010
  GHC-Options:         -Wall
                       -Wcompat
                       -Wno-dodgy-imports
                       -Wno-missing-signatures
                       -Wno-name-shadowing
                       -Wno-unused-do-bind
                       -Wno-unused-matches

executable acid-state-repair
  hs-source-dirs: repair
  build-depends: acid-state
               , base
               , directory
  main-is: Main.hs
  default-language:    Haskell2010


test-suite specs
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  build-depends:       base
                     , acid-state
                     , deepseq
                     , hspec
                     , mtl
                     , safecopy
                     , template-haskell
  build-tool-depends: hspec-discover:hspec-discover
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
  other-modules:       Data.Acid.TemplateHaskellSpec
  default-language:    Haskell2010

test-suite state-machine
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             StateMachine.hs
  build-depends:       base
                     , acid-state
                     , containers
                     , deepseq >= 1.4.0.0
                     , directory
                     , hedgehog
                     , mtl
                     , safecopy
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N -Wall
  other-modules:       Data.Acid.KeyValueStateMachine
                       Data.Acid.StateMachineTest
  default-language:    Haskell2010
  default-extensions:  TypeOperators

  if flag(skip-state-machine-test)
    buildable: False

test-suite examples
  type:                exitcode-stdio-1.0
  hs-source-dirs:      examples
                       examples/errors
  main-is:             Examples.hs
  build-depends:       base
                     , acid-state
                     , cereal
                     , containers
                     , directory
                     , mtl
                     , network
                     , safecopy
                     , text
                     , time
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
  other-modules:       ChangeState
                       ChangeVersion
                       CheckpointCutsEvent
                       Exceptions
                       HelloDatabase
                       HelloWorld
                       HelloWorldNoTH
                       KeyValue
                       KeyValueNoTH
                       MonadStateConstraint
                       ParameterisedState
                       RemoteClient
                       RemoteCommon
                       RemoteServer
                       RemoveEvent
                       SlowCheckpoint
                       StressTest
                       StressTestNoTH
  if !os(windows)
     other-modules:    Proxy
  default-language:    Haskell2010

benchmark loading-benchmark
  type:
    exitcode-stdio-1.0
  hs-source-dirs:
    benchmarks/loading
  main-is:
    Benchmark.hs
  other-modules:
    Benchmark.FileSystem
    Benchmark.Model
    Benchmark.Prelude
  build-depends:
    random,
    directory,
    system-fileio == 0.3.*,
    system-filepath,
    -- perRunEnv was added in criterion-1.2.0.0
    criterion >= 1.2.0.0 && < 1.7,
    mtl,
    base,
    acid-state
  default-language:
    Haskell2010
  default-extensions:
    -- keep this list alphabetically sorted!
    ConstraintKinds
    DataKinds
    DefaultSignatures
    DeriveDataTypeable
    EmptyDataDecls
    FlexibleContexts
    FlexibleInstances
    GADTs
    MultiParamTypeClasses
    NoImplicitPrelude
    NoMonomorphismRestriction
    OverloadedStrings
    PatternGuards
    RankNTypes
    ScopedTypeVariables
    StandaloneDeriving
    TemplateHaskell
    TupleSections
    TypeFamilies
    TypeOperators
  ghc-options:
    -O2