From 3712229efeca5fc0d412d04ef63d014375789534 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 26 Jun 2021 09:56:20 -0500 Subject: [PATCH] gnu: Add cl-tailrec. * gnu/packages/lisp-xyz.scm (sbcl-tailrec): Add new variable. * gnu/packages/lisp-xyz.scm (ecl-tailrec): Add new variable. * gnu/packages/lisp-xyz.scm (cl-tailrec): Add new variable. --- gnu/packages/lisp-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 894bf0962e..500d22ae33 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -17570,3 +17570,39 @@ compiler's concept of a source-form to report where the error or warning is loca (define-public cl-trivial-with-current-source-form (sbcl-package->cl-source-package sbcl-trivial-with-current-source-form)) + +(define-public sbcl-tailrec + (let ((commit "a7cf91ef7bd73c118e96817e809a7ae587d4673f") + (revision "1")) + (package + (name "sbcl-tailrec") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/charje/tailrec") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0a25xa2kqai480micv8ap5bg4pz1dg7q3lz61g1ygim96cdjpwhl")))) + (build-system asdf-build-system/sbcl) + (inputs + `(("sbcl-alexandia" ,sbcl-alexandria) + ("sbcl-trivial-macroexpand-all" ,sbcl-trivial-macroexpand-all) + ("sbcl-trivial-with-current-source-form" + ,sbcl-trivial-with-current-source-form))) + (home-page "https://github.com/charje/tailrec") + (synopsis "A simple macro to optimize a Common Lisp function for tail +recursion") + (description "Just wrap your Common Lisp function in this macro call and +it will be optimized for tail recursion. You will be warning if the function +is not tail recursive.") + (license license:llgpl)))) + +(define-public ecl-tailrec + (sbcl-package->ecl-package sbcl-tailrec)) + +(define-public cl-tailrec + (sbcl-package->cl-source-package sbcl-tailrec)) + -- 2.32.0