packages feed

folds-0.7: folds.cabal

name:          folds
category:      Data, Comonads, Enumerator
version:       0.7
license:       BSD3
cabal-version: >= 1.8
license-file:  LICENSE
author:        Edward A. Kmett
maintainer:    Edward A. Kmett <ekmett@gmail.com>
stability:     experimental
homepage:      http://github.com/ekmett/folds
bug-reports:   http://github.com/ekmett/folds/issues
copyright:     Copyright (C) 2009-2013 Edward A. Kmett
build-type:    Custom
synopsis:      Beautiful Folding

extra-source-files:
  .ghci
  .travis.yml
  .gitignore
  .vim.custom
  CHANGELOG.markdown
  README.markdown

description: This package is a playground full of comonadic folds.
  .
  This style of fold is documented in <https://www.fpcomplete.com/user/edwardk/cellular-automata/part-2 "Cellular Automata, Part II: PNGs and Moore">
  .
  This package can be seen as what happens if you chase Max Rabkin's <http://squing.blogspot.com/2008/11/beautiful-folding.html "Beautiful Folding"> to its logical conclusion.
  .
  More information on this approach can be found in the <http://conal.net/blog/posts/another-lovely-example-of-type-class-morphisms "Another lovely example of type class morphisms"> and <http://conal.net/blog/posts/more-beautiful-fold-zipping "More beautiful fold zipping"> posts by Conal Elliott, as well as in Gabriel Gonzales' <http://www.haskellforall.com/2013/08/composable-streaming-folds.html "Composable Streaming Folds">

source-repository head
  type: git
  location: git://github.com/ekmett/folds.git

-- You can disable the doctests test suite with -f-test-doctests
flag test-doctests
  default: True
  manual: True

-- You can disable the hlint test suite with -f-test-hlint
flag test-hlint
  default: True
  manual: True

-- You can disable the optimizations -f-optimize for faster builds
flag optimize
  default: True
  manual: True

library
  build-depends:
    adjunctions       >= 4.2   && < 5,
    base              >= 4     && < 5,
    bifunctors        >= 4     && < 6,
    comonad           >= 4     && < 5,
    constraints       >= 0.4   && < 1,
    contravariant     >= 0.4.2 && < 2,
    data-reify        >= 0.6   && < 0.7,
    distributive      >= 0.3   && < 1,
    lens              >= 4     && < 5,
    mtl               >= 2.2   && < 2.3,
    pointed           >= 4     && < 5,
    profunctors       >= 5     && < 6,
    reflection        >= 1.3   && < 3,
    semigroupoids     >= 4     && < 6,
    transformers      >= 0.3   && < 0.5,
    unordered-containers >= 0.2 && < 0.3,
    vector            >= 0.10  && < 0.12

  if impl(ghc < 7.8)
    build-depends: tagged >= 0.7 && < 1

  if impl(ghc < 7.11)
    build-depends: semigroups >= 0.8 && < 1

  hs-source-dirs: src

  exposed-modules:
    Data.Fold
    Data.Fold.Class
    Data.Fold.Internal
    Data.Fold.L
    Data.Fold.L'
    Data.Fold.L1
    Data.Fold.L1'
    Data.Fold.M
    Data.Fold.M1
    Data.Fold.R
    Data.Fold.R1

  ghc-options: -Wall

  if flag(optimize)
    ghc-options: -O2

test-suite hlint
  type: exitcode-stdio-1.0
  main-is: hlint.hs
  ghc-options: -w -threaded -rtsopts -with-rtsopts=-N
  hs-source-dirs: tests

  if !flag(test-hlint)
    buildable: False
  else
    build-depends:
      base,
      hlint >= 1.7

test-suite doctests
  type:           exitcode-stdio-1.0
  main-is:        doctests.hs
  ghc-options:    -Wall -threaded
  hs-source-dirs: tests

  if !flag(test-doctests)
    buildable: False
  else
    build-depends:
      base,
      bytestring,
      directory      >= 1.0,
      deepseq,
      doctest        >= 0.9.1,
      filepath,
      mtl,
      semigroups     >= 0.9