definitive-base 1.2 → 1.2.1
raw patch · 2 files changed
+40/−53 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Data.Containers.Monad: instance (Monoid k, Ord k) => Applicative (Map k)
- Data.Containers.Monad: instance (Monoid k, Ord k) => Monad (Map k)
- Data.Containers.Monad: instance (Monoid k, Ord k) => Unit (Map k)
Files
- Data/Containers/Monad.hs +0/−12
- definitive-base.cabal +40/−41
− Data/Containers/Monad.hs
@@ -1,12 +0,0 @@-module Data.Containers.Monad where--import Definitive.Base-import Data.Containers--instance (Monoid k,Ord k) => Unit (Map k) where- pure a = singleton zero a-instance (Monoid k,Ord k) => Applicative (Map k)-instance (Monoid k,Ord k) => Monad (Map k) where- join m = foldMap fun (m^.keyed)- where fun (k,m') = m' & ascList %~ \l -> [(k+k',a) | (k',a) <- l]-
definitive-base.cabal view
@@ -2,50 +2,49 @@ name: definitive-base category: Prelude synopsis: The base modules of the Definitive framework.-description: The Definitive framework is an attempt at harnessing the declarative- nature of Haskell to provide a solid and simple base for writing - real-world programs, as well as complex algorithms.- - This package contains the base modules of the framework, and provides- only the most basic functionality, ranging from basic algebraic- structures, such as monoids and rings, to functors, applicative functors,- monads and transformers.- - Lenses are used heavily in all the framework's abstractions, replacing- more traditional functions ('WriterT' and 'runWriterT' are implemented- in the same isomorphism 'writerT', for example). When used wisely,- lenses can greatly improve clarity in both code and thought, so I- tried to provide for them in the most ubiquitous way possible,- defining them as soon as possible. Isomorphisms in particular are- surprisingly useful in many instances, from converting between types- to acting on a value's representation as if it were the value itself.- - Packages using the Definitive framework should be compiled with the - RebindableSyntax flag and include the Definitive module, which exports- the same interface as the Prelude, except for some extras.- - Here is a list of design differences between the standard Prelude- and the Definitive framework :- - - The '+', '-', 'negate', and '*' are now part of the Semigroup,- Disjonctive, Negative, Semiring classes instead of Num (default- instances are defined to reimplement the Prelude, making it easy- to adjust your code for compatibility) - - - The mapM, traverseM, liftM, and such functions have been hidden,- since they only reimplement the traverse, map, and other simpler- functions.- - - Lenses are used whenever possible instead of more usual functions.- You are encouraged to read the interface for the Algebra.Lens- module, which contains everything you will need to be able to use- lenses to their full potential (except maybe a good explanation).- +description: The Definitive framework is an attempt at harnessing the declarative+ nature of Haskell to provide a solid and simple base for writing + real-world programs, as well as complex algorithms.+ .+ This package contains the base modules of the framework, and provides+ only the most basic functionality, ranging from basic algebraic+ structures, such as monoids and rings, to functors, applicative functors,+ monads and transformers.+ .+ Lenses are used heavily in all the framework's abstractions, replacing+ more traditional functions ('WriterT' and 'runWriterT' are implemented+ in the same isomorphism 'writerT', for example). When used wisely,+ lenses can greatly improve clarity in both code and thought, so I+ tried to provide for them in the most ubiquitous way possible,+ defining them as soon as possible. Isomorphisms in particular are+ surprisingly useful in many instances, from converting between types+ to acting on a value's representation as if it were the value itself.+ .+ Packages using the Definitive framework should be compiled with the + RebindableSyntax flag and include the Definitive module, which exports+ the same interface as the Prelude, except for some extras.+ + Here is a list of design differences between the standard Prelude+ and the Definitive framework :+ .+ * The '+', '-', 'negate', and '*' are now part of the Semigroup,+ Disjonctive, Negative, Semiring classes instead of Num (default+ instances are defined to reimplement the Prelude, making it easy+ to adjust your code for compatibility) + .+ * The mapM, traverseM, liftM, and such functions have been hidden,+ since they only reimplement the traverse, map, and other simpler+ functions.+ .+ * Lenses are used whenever possible instead of more usual functions.+ You are encouraged to read the interface for the Algebra.Lens+ module, which contains everything you will need to be able to use+ lenses to their full potential (except maybe a good explanation). -- meta-information author: Marc Coiffier maintainer: marc.coiffier@gmail.com-version: 1.2+version: 1.2.1 license: OtherLicense license-file: LICENSE @@ -54,7 +53,7 @@ cabal-version: >=1.10 library- exposed-modules: Definitive Definitive.Base Algebra.Arrow Algebra.Core Algebra.Classes Algebra.Monad Algebra.Monad.Base Algebra.Applicative Algebra.Functor Algebra.Traversable Algebra.Foldable Algebra.Lens Algebra.Monad.RWS Algebra.Monad.State Algebra.Monad.Reader Algebra.Monad.Writer Algebra.Monad.Cont Algebra.Monad.Foldable Algebra.Monad.Error Data.Containers Data.Containers.Sequence Data.Probability Data.Containers.Monad+ exposed-modules: Definitive Definitive.Base Algebra.Arrow Algebra.Core Algebra.Classes Algebra.Monad Algebra.Monad.Base Algebra.Applicative Algebra.Functor Algebra.Traversable Algebra.Foldable Algebra.Lens Algebra.Monad.RWS Algebra.Monad.State Algebra.Monad.Reader Algebra.Monad.Writer Algebra.Monad.Cont Algebra.Monad.Foldable Algebra.Monad.Error Data.Containers Data.Containers.Sequence Data.Probability build-depends: base (== 4.6.*), containers (== 0.5.*), deepseq (== 1.3.*), array (== 0.5.*), bytestring (== 0.10.*), vector (== 0.10.*), primitive (== 0.5.*) default-extensions: TypeSynonymInstances NoMonomorphismRestriction StandaloneDeriving GeneralizedNewtypeDeriving TypeOperators RebindableSyntax FlexibleInstances FlexibleContexts FunctionalDependencies TupleSections MultiParamTypeClasses Rank2Types ghc-options: -Wall -fno-warn-orphans -threaded