packages feed

patch-0.0.8.3: patch.cabal

cabal-version:      >=1.10
name:               patch
version:            0.0.8.3
license:            BSD3
license-file:       LICENSE
maintainer:         maintainer@obsidian.systems
author:             Ryan Trinkle
stability:          Experimental
tested-with:
    ghc ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.5 || ==9.6.1 || ==9.8.2 || ==9.10.1
    ghcjs ==8.6 || ==8.10

homepage:           https://obsidian.systems
bug-reports:        https://github.com/reflex-frp/patch/issues
synopsis:
    Data structures for describing changes to other data structures.

description:
    Data structures for describing changes to other data structures.
    .
    In this library, a patch is something which can be applied, analogous to a
    function, and which distinguishes returning the argument it was provided from
    returning something else.

category:           FRP
build-type:         Simple
extra-source-files:
    README.md
    ChangeLog.md

source-repository head
    type:     git
    location: https://github.com/reflex-frp/patch

flag split-these
    description: Use split these/semialign packages

flag hlint
    description: Enable hlint test

library
    exposed-modules:
        Data.Functor.Misc
        Data.Monoid.DecidablyEmpty
        Data.Patch
        Data.Patch.Class
        Data.Patch.DMap
        Data.Patch.DMapWithMove
        Data.Patch.IntMap
        Data.Patch.Map
        Data.Patch.MapWithMove
        Data.Patch.MapWithPatchingMove
        Data.Patch.PatchOrReplacement
        Data.Semigroup.Additive

    hs-source-dirs:     src
    default-language:   Haskell2010
    default-extensions: PolyKinds
    ghc-options:        -Wall -fwarn-redundant-constraints -fwarn-tabs
    build-depends:
        base >=4.9 && <=4.21,
        constraints-extras >=0.3 && <0.5,
        commutative-semigroups >=0.0 && <0.3,
        containers >=0.6 && <0.8,
        dependent-map >=0.3 && <0.5,
        dependent-sum >=0.6 && <0.8,
        lens >=4.7 && <5.4,
        indexed-traversable >=0.1 && <0.2,
        semigroupoids >=4.0 && <7,
        transformers >=0.5.6.0 && <0.7,
        witherable >=0.3 && <0.6

    if impl(ghc <8.6)
        build-depends: base-orphans >=0.8 && <0.10

    if flag(split-these)
        build-depends:
            these >=1 && <1.3,
            semialign >=1 && <1.4,
            monoidal-containers >=0.6 && <0.7

    else
        build-depends:
            these >=0.4 && <0.9,
            monoidal-containers ==0.4.0.0

test-suite tests
    type:             exitcode-stdio-1.0
    main-is:          tests.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    build-depends:
        base,
        patch,
        containers,
        hedgehog <1.6,
        HUnit <1.7

    if (impl(ghcjs >=0) || arch(javascript))
        buildable: False

test-suite hlint
    type:             exitcode-stdio-1.0
    main-is:          hlint.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    build-depends:
        base,
        directory,
        filepath,
        filemanip

    if impl(ghc >=9.6)
        buildable: False

    if impl(ghc <9.2)
        build-depends: hlint (<2.1 || >=2.2.2) && <3.5

    else
        build-depends: hlint >=3.5 && <3.6

    if ((impl(ghcjs >=0) || arch(javascript)) || !flag(hlint))
        buildable: False