packages feed

changeset-containers-0.2: changeset-containers.cabal

cabal-version: 2.4
name: changeset-containers
version: 0.2
synopsis: Stateful monad transformer based on monoidal actions
description:
  A general state monad transformer with separate types for the state and the possible changes.
  It can be defined for any monoid action.
  The monoid represents "changes", "updates", "edits" or "diffs" on the state.
  This package exposes typical changes for @containers@ such as maps, sequences, and sets.
  To change individual elements of a container, have a look at the indexed changes in [@changeset-lens@](hackage.haskell.org/package/changeset-lens).

license: MIT
license-file: LICENSE
author: Manuel Bärenz
maintainer: programming@manuelbaerenz.de
copyright: MIT
category: Control
build-type: Simple
extra-doc-files: CHANGELOG.md

source-repository head
  type: git
  location: https://github.com/turion/changeset

flag dev
  description: Enable warnings as errors. Active on ci.
  default: False
  manual: True

common opts
  ghc-options:
    -Wall

  if flag(dev)
    ghc-options:
      -Werror
  default-extensions:
    BangPatterns
    DeriveFunctor
    DeriveGeneric
    DeriveTraversable
    DerivingStrategies
    FlexibleContexts
    FlexibleInstances
    FunctionalDependencies
    GADTs
    GeneralizedNewtypeDeriving
    ImportQualifiedPost
    KindSignatures
    LambdaCase
    MultiParamTypeClasses
    NamedFieldPuns
    QuantifiedConstraints
    RankNTypes
    ScopedTypeVariables
    StandaloneDeriving
    StrictData
    TupleSections
    TypeApplications
    TypeOperators

library
  import: opts
  exposed-modules:
    Data.Monoid.RightAction.IntMap
    Data.Monoid.RightAction.IntSet
    Data.Monoid.RightAction.Map
    Data.Monoid.RightAction.Sequence
    Data.Monoid.RightAction.Set

  build-depends:
    base >=4.16 && <4.23,
    changeset ==0.2,
    containers >=0.6 && <0.8,
    indexed-traversable ^>=0.1,
    monoid-extras ^>=0.7,
    transformers >=0.5.6.2 && <0.7,

  hs-source-dirs: src
  default-language: Haskell2010

test-suite changeset-containers-test
  import: opts
  default-language: Haskell2010
  type: exitcode-stdio-1.0
  hs-source-dirs: test
  main-is: Main.hs
  build-depends:
    base,
    changeset,
    changeset-containers,
    containers,
    data-default,
    falsify ^>=0.2.0,
    monoid-extras,
    tasty >=1.4.2 && <1.6,
    tasty-hunit ^>=0.10.2,

  other-modules:
    IntMap
    IntSet
    Map
    Sequence
    Set