summaryrefslogtreecommitdiff
path: root/bs/repl.scm
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-05-13 13:32:14 -0700
committerBen Sima <ben@bsima.me>2020-05-13 13:32:14 -0700
commite6ad8129cc854dac38940acb24e3a07cd0cd7b56 (patch)
treedfadd90e9039184e3d1415cdcddfcd39108e9d5c /bs/repl.scm
parent5fc1cc6602ac03d05ce004d8d4d9c712242f318b (diff)
Re-namespace general scheme code to bs
Diffstat (limited to 'bs/repl.scm')
-rw-r--r--bs/repl.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/bs/repl.scm b/bs/repl.scm
new file mode 100644
index 0000000..3932433
--- /dev/null
+++ b/bs/repl.scm
@@ -0,0 +1,17 @@
+(define-module (bs repl))
+;; (use-modules (system repl common))
+;; (repl-default-option-set!
+;; 'prompt
+;; (lambda (repl)
+;; (format #f "\n[~a@~a:~a]\nλ> "
+;; (getenv "USER")
+;; (vector-ref (uname) 1)
+;; (pwd))))
+
+;; TODO(bsima): (doc x)
+
+(eval-when (compile load eval)
+ (define-meta-command ((src nala) repl (form))
+ "Print source code of specified Scheme procedure."
+ (call-with-values (repl-prepare-eval-thunk repl (repl-parse repl form))
+ (lambda args (for-each print-src args)))))