s-cargot-letbind: Enables let-binding and let-expansion for s-cargot defined S-expressions.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

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.


Change log ChangeLog.md
Dependencies base (>=4.10 && <4.11), s-cargot (>=, text (>=1.2 && <2) [details]
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 KevinQuick at 2018-02-16T20:57:50Z




Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees