s-cargot-letbind: Enables let-binding and let-expansion for s-cargot defined S-expressions.
This module allows let bindings to be introduced into the S-Expression syntax.
For example, instead of:
(concat (if (enabled x) (+ (width x) (width y)) (width y))
" meters")this can be re-written with let bindings:
(let ((wy (width y))
(wboth (+ (width x) wy))
(wide (if (enabled x) wboth wy))
)
(concat wide " meters"))As S-expressions grow larger, let-binding can help readability for
those expressions. This module provides the discoverLetBindings
function that will convert an S-expression into one containing
let-bound variables, and the inverse function letExpand which will
expand let-bound variables back into the expression.
Downloads
- s-cargot-letbind-0.2.5.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.0, 0.2.0.0, 0.2.1.0, 0.2.2.0, 0.2.3.0, 0.2.4.0, 0.2.5.0 |
|---|---|
| Change log | ChangeLog.md |
| Dependencies | base (>=4.9 && <5), s-cargot (>=0.1.6.0 && <0.2), text (>=1.2 && <2.2) [details] |
| Tested with | ghc ==8.8.4, ghc ==8.10.7, ghc ==9.2.7, ghc ==9.4.4, ghc ==9.6.1 |
| License | ISC |
| Copyright | 2018 Kevin Quick |
| Author | Kevin Quick |
| Maintainer | kquick@galois.com |
| Category | Data |
| Home page | https://github.com/GaloisInc/s-cargot-letbind |
| Source repo | head: git clone git://github.com/GaloisInc/s-cargot-letbind.git |
| Uploaded | by ryanglscott at 2024-08-07T17:46:54Z |
| Distributions | NixOS:0.2.5.0 |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 3750 total (17 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2024-08-07 [all 1 reports] |