prelude-edsl: An EDSL-motivated subset of the Prelude
Prelude.EDSL exports a small subset of the Prelude: some standard types and classes plus a small number of convenience functions.
The motivation for this module is that it is common for deeply embedded domain-specific languages (EDSLs) to redefine identifiers from the Prelude, so EDSL users must hide the Prelude in their programs. However, there are certain useful things from the Prelude that are usually not redefined -- function composition being one example -- so it becomes quite awkward to have to hide everything from the Prelude.
The reason for exporting e.g the Num
class but not Ord
is that it is possible to give an instance for deep
embeddings of the former but not the latter. For example,
assuming Exp
is the type of a deep embedding, we can have
(+) :: Exp -> Exp -> Exp
but not
(<) :: Exp -> Exp -> Exp
(because (<)
has a Bool
result, regardless of the type
of the arguments).
Downloads
- prelude-edsl-0.4.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] | 0.1, 0.1.1, 0.1.2, 0.2, 0.3, 0.3.1, 0.4 |
---|---|
Dependencies | base (<20) [details] |
License | BSD-3-Clause |
Copyright | Copyright (c) 2015, Emil Axelsson |
Author | Emil Axelsson |
Maintainer | emax@chalmers.se |
Category | Language |
Home page | https://github.com/emilaxelsson/prelude-edsl |
Bug tracker | https://github.com/emilaxelsson/prelude-edsl/issues |
Source repo | head: git clone git@github.com:emilaxelsson/prelude-edsl.git |
Uploaded | by EmilAxelsson at 2016-04-20T12:19:35Z |
Distributions | NixOS:0.4 |
Reverse Dependencies | 1 direct, 1 indirect [details] |
Downloads | 4239 total (11 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2016-04-20 [all 1 reports] |