packages feed

dlist-nonempty-0.1.2: dlist-nonempty.cabal

name:               dlist-nonempty
version:            0.1.2
synopsis:           Non-empty difference lists
description:
  Difference lists are a list-like type supporting O(1) append. This is
  particularly useful for efficient logging and pretty printing (e.g. with the
  Writer monad), where list append quickly becomes too expensive.
  .
  > DList a         ≅ [a] -> [a]
  > NonEmptyDList a ≅ [a] -> NonEmpty a
  .
  For empty variant, @DList@, see <http://hackage.haskell.org/package/dlist dlist package>.

category:           Data
license:            BSD3
license-file:       LICENSE
author:             Don Stewart, Oleg  Grenrus
maintainer:         Oleg Grenrus <oleg.grenrus@iki.fi>
copyright:
  2006-2009 Don Stewart, 2013-2016 Sean Leather, 2017 Oleg Grenrus

homepage:           https://github.com/phadej/dlist-nonempty
bug-reports:        https://github.com/phadej/dlist-nonempty/issues
extra-source-files:
  CHANGELOG.md
  README.md

build-type:         Simple
cabal-version:      >=1.10
tested-with:
  GHC ==7.4.2
   || ==7.6.3
   || ==7.8.4
   || ==7.10.3
   || ==8.0.2
   || ==8.2.2
   || ==8.4.4
   || ==8.6.5
   || ==8.8.4
   || ==8.10.7
   || ==9.0.2
   || ==9.2.5
   || ==9.4.4

source-repository head
  type:     git
  location: git://github.com/phadej/dlist-nonempty.git

flag semigroupoids
  description: Build with semigroupoids dependency
  manual:      True
  default:     True

library
  default-language: Haskell2010
  hs-source-dirs:   src
  build-depends:
      base     >=4.5 && <4.18
    , deepseq  >=1.3 && <1.5
    , dlist    >=1.0 && <1.1

  if flag(semigroupoids)
    build-depends: semigroupoids >=5.1 && <5.4

  if !impl(ghc >=8.0)
    build-depends: semigroups >=0.18.2 && <0.21

  other-extensions: CPP
  exposed-modules:
    Data.DList.NonEmpty
    Data.DList.NonEmpty.Unsafe

  other-modules:
    Data.DList.NonEmpty.Internal
    DListUnsafe

  if impl(ghc >=7.8)
    other-modules: GhcIsList

  ghc-options:      -Wall

  if impl(ghc >=8.0)
    ghc-options: -Wcompat

test-suite test
  default-language: Haskell2010
  type:             exitcode-stdio-1.0
  main-is:          Main.hs
  hs-source-dirs:   tests
  other-modules:    OverloadedStrings
  build-depends:
      base
    , Cabal
    , dlist-nonempty
    , QuickCheck            >=2.9 && <2.15
    , quickcheck-instances

  if !impl(ghc >=8.0)
    build-depends: semigroups

benchmark bench
  default-language: Haskell2010
  type:             exitcode-stdio-1.0
  main-is:          Main.hs
  hs-source-dirs:   bench
  build-depends:
      base
    , base-compat
    , criterion        >=1.1.4.0 && <1.7
    , dlist
    , dlist-instances
    , dlist-nonempty

  if !impl(ghc >=8.0)
    build-depends: semigroups