diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-30 16:39:59 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-11-06 00:46:26 +0100 |
commit | 1000dde87131a77f456139bdf19e0a87b0776608 (patch) | |
tree | 503937fb0a6d5d6aa47a6e5d3be94c511c739286 /module/hnh/module-introspection.scm | |
parent | HAdd sections to introspection documentation. (diff) | |
download | calp-1000dde87131a77f456139bdf19e0a87b0776608.tar.gz calp-1000dde87131a77f456139bdf19e0a87b0776608.tar.xz |
Merge (hnh module-introspection static) into parent module.
It only contained a single binding, and the base module was already
utilities.
Diffstat (limited to '')
-rw-r--r-- | module/hnh/module-introspection.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/module/hnh/module-introspection.scm b/module/hnh/module-introspection.scm index 83e561f1..254c33c7 100644 --- a/module/hnh/module-introspection.scm +++ b/module/hnh/module-introspection.scm @@ -4,6 +4,7 @@ :export (unique-symbols find-module-declaration module-declaration? + get-forms )) @@ -20,3 +21,10 @@ (define (find-module-declaration forms) (and=> (find module-declaration? forms) cadr)) + +(define (get-forms port) + (let loop ((done '())) + (let ((form (read port))) + (if (eof-object? form) + done + (loop (cons form done)))))) |