1name: semigroupoids 2category: Control, Comonads 3version: 5.3.4 4x-revision: 1 5license: BSD3 6cabal-version: >= 1.8 7license-file: LICENSE 8author: Edward A. Kmett 9maintainer: Edward A. Kmett <ekmett@gmail.com> 10stability: provisional 11homepage: http://github.com/ekmett/semigroupoids 12bug-reports: http://github.com/ekmett/semigroupoids/issues 13copyright: Copyright (C) 2011-2015 Edward A. Kmett 14tested-with: GHC == 7.0.4 15 , GHC == 7.2.2 16 , GHC == 7.4.2 17 , GHC == 7.6.3 18 , GHC == 7.8.4 19 , GHC == 7.10.3 20 , GHC == 8.0.2 21 , GHC == 8.2.2 22 , GHC == 8.4.4 23 , GHC == 8.6.5 24 , GHC == 8.8.1 25build-type: Custom 26synopsis: Semigroupoids: Category sans id 27extra-source-files: 28 .travis.yml 29 .gitignore 30 .vim.custom 31 README.markdown 32 CHANGELOG.markdown 33 Warning.hs 34description: 35 Provides a wide array of (semi)groupoids and operations for working with them. 36 . 37 A 'Semigroupoid' is a 'Category' without the requirement of identity arrows for every object in the category. 38 . 39 A 'Category' is any 'Semigroupoid' for which the Yoneda lemma holds. 40 . 41 When working with comonads you often have the @\<*\>@ portion of an @Applicative@, but 42 not the @pure@. This was captured in Uustalu and Vene's \"Essence of Dataflow Programming\" 43 in the form of the @ComonadZip@ class in the days before @Applicative@. Apply provides a weaker invariant, but for the comonads used for data flow programming (found in the streams package), this invariant is preserved. Applicative function composition forms a semigroupoid. 44 . 45 Similarly many structures are nearly a comonad, but not quite, for instance lists provide a reasonable 'extend' operation in the form of 'tails', but do not always contain a value. 46 . 47 Ideally the following relationships would hold: 48 . 49 > Foldable ----> Traversable <--- Functor ------> Alt ---------> Plus Semigroupoid 50 > | | | | | 51 > v v v v v 52 > Foldable1 ---> Traversable1 Apply --------> Applicative -> Alternative Category 53 > | | | | 54 > v v v v 55 > Bind ---------> Monad -------> MonadPlus Arrow 56 > 57 . 58 Apply, Bind, and Extend (not shown) give rise the Static, Kleisli and Cokleisli semigroupoids respectively. 59 . 60 This lets us remove many of the restrictions from various monad transformers 61 as in many cases the binding operation or @\<*\>@ operation does not require them. 62 . 63 Finally, to work with these weaker structures it is beneficial to have containers 64 that can provide stronger guarantees about their contents, so versions of 'Traversable' 65 and 'Foldable' that can be folded with just a 'Semigroup' are added. 66 67source-repository head 68 type: git 69 location: git://github.com/ekmett/semigroupoids.git 70 71custom-setup 72 setup-depends: 73 base >= 4 && < 5, 74 Cabal, 75 cabal-doctest >= 1 && < 1.1 76 77flag containers 78 description: 79 You can disable the use of the `containers` package using `-f-containers`. 80 . 81 Disabing this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users. 82 default: True 83 manual: True 84 85flag contravariant 86 description: 87 You can disable the use of the `contravariant` package using `-f-contravariant`. 88 . 89 Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users. 90 . 91 If disabled we will not supply instances of `Contravariant` 92 . 93 default: True 94 manual: True 95 96flag distributive 97 description: 98 You can disable the use of the `distributive` package using `-f-distributive`. 99 . 100 Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users. 101 . 102 If disabled we will not supply instances of `Distributive` 103 . 104 default: True 105 manual: True 106 107flag doctests 108 description: 109 You can disable testing with doctests using `-f-doctests`. 110 default: True 111 manual: True 112 113flag comonad 114 description: 115 You can disable the use of the `comonad` package using `-f-comonad`. 116 . 117 Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users. 118 . 119 If disabled we will not supply instances of `Comonad` 120 . 121 default: True 122 manual: True 123 124flag tagged 125 description: 126 You can disable the use of the `tagged` package using `-f-tagged`. 127 . 128 Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users. 129 default: True 130 manual: True 131 132flag unordered-containers 133 description: 134 You can disable the use of the `unordered-containers` package (and also its dependency `hashable`) using `-f-unordered-containers`. 135 . 136 Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users. 137 default: True 138 manual: True 139 140library 141 build-depends: 142 base >= 4.3 && < 5, 143 base-orphans >= 0.8 && < 1, 144 bifunctors >= 5 && < 6, 145 template-haskell, 146 transformers >= 0.2 && < 0.6, 147 transformers-compat >= 0.5 && < 0.7 148 149 if impl(ghc >= 7.0 && < 7.2) 150 build-depends: generic-deriving >= 1.11 && < 1.14 151 152 if impl(ghc >= 7.2 && < 7.6) 153 build-depends: ghc-prim 154 155 if !impl(ghc >= 8.0) 156 build-depends: semigroups >= 0.16.2 && < 1 157 158 if flag(containers) 159 build-depends: containers >= 0.3 && < 0.7 160 161 if flag(contravariant) 162 build-depends: contravariant >= 0.2.0.1 && < 2 163 164 if flag(distributive) 165 build-depends: distributive >= 0.2.2 && < 1 166 167 if flag(comonad) 168 build-depends: comonad >= 4.2.6 && < 6 169 170 if flag(tagged) 171 build-depends: tagged >= 0.8.5 && < 1 172 173 if flag(unordered-containers) 174 build-depends: hashable >= 1.1 && < 1.4, 175 unordered-containers >= 0.2 && < 0.3 176 177 hs-source-dirs: src 178 179 exposed-modules: 180 Data.Bifunctor.Apply 181 Data.Functor.Alt 182 Data.Functor.Apply 183 Data.Functor.Bind 184 Data.Functor.Bind.Class 185 Data.Functor.Bind.Trans 186 Data.Functor.Extend 187 Data.Functor.Plus 188 Data.Groupoid 189 Data.Isomorphism 190 Data.Semigroup.Bifoldable 191 Data.Semigroup.Bitraversable 192 Data.Semigroup.Foldable 193 Data.Semigroup.Foldable.Class 194 Data.Semigroup.Traversable 195 Data.Semigroup.Traversable.Class 196 Data.Semigroupoid 197 Data.Semigroupoid.Dual 198 Data.Semigroupoid.Ob 199 Data.Semigroupoid.Static 200 Data.Traversable.Instances 201 202 ghc-options: -Wall -fno-warn-warnings-deprecations 203 204 if impl(ghc >= 7.10) 205 ghc-options: -fno-warn-trustworthy-safe 206 207test-suite doctests 208 type: exitcode-stdio-1.0 209 main-is: doctests.hs 210 hs-source-dirs: test 211 ghc-options: -Wall -fno-warn-warnings-deprecations 212 213 if !flag(doctests) 214 buildable: False 215 else 216 build-depends: 217 base >= 4 && < 5, 218 doctest >= 0.11.1 && < 0.18, 219 semigroupoids 220