summary refs log tree commit diff
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2022-06-30 17:25:46 +0200
committerPierre Neidhardt <mail@ambrevar.xyz>2022-06-30 20:01:36 +0200
commit2e08e8a648e0fe5a6cc6a292582db0eba276b90d (patch)
tree86e23eab16c86fef2c2792d720bc8ad75a9a1b7c
parentb754c3da53adaabe08ad95b8819b297ad560c197 (diff)
downloadguix-2e08e8a648e0fe5a6cc6a292582db0eba276b90d.tar.gz
gnu: Add compiler-macro-notes.
* gnu/packages/lisp-xyz.scm (cl-compiler-macro-notes,
ecl-compiler-macro-notes, sbcl-compiler-macro-notes): New variables.
-rw-r--r--gnu/packages/lisp-xyz.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index b8f1df3b00..1516fd417e 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -21925,3 +21925,44 @@ perform a variety of optimizations.")
 
 (define-public ecl-fast-generic-functions
   (sbcl-package->ecl-package sbcl-fast-generic-functions))
+
+(define-public sbcl-compiler-macro-notes
+  (package
+    (name "sbcl-compiler-macro-notes")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/digikar99/compiler-macro-notes")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name "cl-compiler-macro-notes" version))
+       (sha256
+        (base32 "1jv8snj2wvim3k9qhl1vsx82n56nzdmwa3ms9c4ml2d58fwpfjzs"))))
+    (build-system asdf-build-system/sbcl)
+    (inputs
+     (list sbcl-alexandria
+           sbcl-cl-environments))
+    (home-page "https://github.com/digikar99/compiler-macro-notes")
+    (synopsis "Macros and conditions for use within macros and compiler-macros")
+    (description
+     "Alternative to the @code{compiler-macro} library:
+
+@itemize
+@item Here, we do not treat compiler notes as warnings, but instead these are
+a separate class of conditions.  These are also not errors.
+@item Two main condition classes are provided: compiler-macro-notes:note and
+compiler-macro-notes:optimization-failure-note.  While the latter is a subclass
+of the former, the latter notes are printed in a slightly different manner to
+the former.
+@item To be able to correctly print the expansion path that led to the
+condition, user code is expected to avoid performing a nonlocal exit to a
+place outside with-notes.
+@end itemize\n")
+    (license license:expat)))
+
+(define-public cl-compiler-macro-notes
+  (sbcl-package->cl-source-package sbcl-compiler-macro-notes))
+
+(define-public ecl-compiler-macro-notes
+  (sbcl-package->ecl-package sbcl-compiler-macro-notes))