definitive-base: The base modules of the Definitive framework.
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).
Modules
[Index]
Downloads
- definitive-base-2.3.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 1.0, 1.2, 1.2.1, 2.3 |
---|---|
Dependencies | array (>=0.5 && <0.6), base (>=4.7 && <4.8), bytestring (>=0.10 && <0.11), containers (>=0.5 && <0.6), deepseq (>=1.3 && <1.4), ghc-prim (>=0.3 && <0.4), GLURaw (>=1.4 && <1.5), OpenGL (>=2.9 && <2.10), OpenGLRaw (>=1.5 && <1.6), primitive (>=0.5 && <0.6), vector (>=0.10 && <0.11) [details] |
Tested with | ghc ==7.8.3 |
License | LicenseRef-OtherLicense |
Author | Marc Coiffier |
Maintainer | marc.coiffier@gmail.com |
Category | Prelude |
Home page | http://coiffier.net/projects/definitive-framework.html |
Uploaded | by MarcCoiffier at 2014-11-11T21:38:09Z |
Distributions | |
Reverse Dependencies | 7 direct, 0 indirect [details] |
Downloads | 3688 total (9 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |