File: recursion-schemes.cabal

package info (click to toggle)
haskell-recursion-schemes 5.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 136 kB
  • sloc: haskell: 1,010; ansic: 19; makefile: 4
file content (105 lines) | stat: -rw-r--r-- 3,403 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name:          recursion-schemes
category:      Control, Recursion
version:       5.1.3
license:       BSD2
cabal-version: >= 1.8
license-file:  LICENSE
author:        Edward A. Kmett
maintainer:    "Samuel GĂ©lineau" <gelisam@gmail.com>,
               "Oleg Grenrus" <oleg.grenrus@iki.fi>,
               "Ryan Scott" <ryan.gl.scott@gmail.com>
stability:     provisional
homepage:      http://github.com/ekmett/recursion-schemes/
bug-reports:   http://github.com/ekmett/recursion-schemes/issues
copyright:     Copyright (C) 2008-2015 Edward A. Kmett
synopsis:      Representing common recursion patterns as higher-order functions
description:   Many recursive functions share the same structure, e.g. pattern-match on the input and, depending on the data constructor, either recur on a smaller input or terminate the recursion with the base case. Another one: start with a seed value, use it to produce the first element of an infinite list, and recur on a modified seed in order to produce the rest of the list. Such a structure is called a recursion scheme. Using higher-order functions to implement those recursion schemes makes your code clearer, faster, and safer. See README for details.

tested-with:   GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.4

build-type:    Simple
extra-source-files: .travis.yml CHANGELOG.markdown .gitignore README.markdown include/recursion-schemes-common.h

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

flag template-haskell
  description: About Template Haskell derivations
  manual: True
  default: True

library
  other-extensions:
    CPP
    TypeFamilies
    Rank2Types
    FlexibleContexts
    FlexibleInstances
    GADTs
    StandaloneDeriving
    UndecidableInstances

  hs-source-dirs: src
  include-dirs: include
  -- includes: recursion-schemes-common.h

  build-depends:
    base                 >= 4.5     && < 5,
    comonad              >= 4       && < 6,
    free                 >= 4       && < 6,
    transformers         >= 0.3.0.0 && < 1

  if !impl(ghc >= 8.2)
    build-depends: bifunctors >= 4 && < 6

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

  if impl(ghc < 7.5)
    build-depends: ghc-prim

  -- Following two conditionals aren't inverses (there are other compilers than GHC)
  --
  -- We enforce the fact that with GHC-7.10
  -- we have at least transformers-0.4.2.0 (the bundled one)
  -- which has 'Data.Functor.Classes' module. (transformers-0.3 doesn't have)
  if impl(ghc >= 7.10)
    build-depends:
      transformers         >= 0.4.2.0

  if !impl(ghc >= 7.10)
    build-depends:
      nats,
      transformers-compat  >= 0.3     && < 1

  exposed-modules:
    Data.Functor.Base
    Data.Functor.Foldable

  if flag(template-haskell)
    build-depends:
      template-haskell >= 2.5.0.0 && < 2.15,
      base-orphans     >= 0.5.4   && < 0.9,
      th-abstraction   >= 0.2.4   && < 0.4
    exposed-modules:
      Data.Functor.Foldable.TH

    other-modules:
      Paths_recursion_schemes

  ghc-options: -Wall

test-suite Expr
  type: exitcode-stdio-1.0
  main-is: Expr.hs
  hs-source-dirs: examples
  ghc-options: -Wall -threaded
  build-depends:
    base,
    HUnit <1.7,
    recursion-schemes,
    template-haskell,
    transformers     >= 0.2     && < 1
  if impl(ghc < 7.5)
    build-depends: ghc-prim