summaryrefslogtreecommitdiff
path: root/Alpha/Repl.scm
diff options
context:
space:
mode:
Diffstat (limited to 'Alpha/Repl.scm')
-rw-r--r--Alpha/Repl.scm20
1 files changed, 7 insertions, 13 deletions
diff --git a/Alpha/Repl.scm b/Alpha/Repl.scm
index f2d9160..f3f7898 100644
--- a/Alpha/Repl.scm
+++ b/Alpha/Repl.scm
@@ -1,11 +1,4 @@
-(define-module (Alpha Repl)
- #:export ())
-
-
-;;
-;; repl customization
-;;
-
+(define-module (Alpha Repl))
;; (use-modules (system repl common))
;; (repl-default-option-set!
;; 'prompt
@@ -16,8 +9,9 @@
;; (pwd))))
;; TODO(bsima): (doc x)
-;; TODO(bsima): (src x)
-;; TODO(bsima): ,src command
-;; TODO(bsima): ,shell command
-;; TODO(bsima): how to load this file on startup?
-;; for ,src and ,shell https://github.com/NalaGinrut/nala-repl
+
+(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)))))