repl: Fix expand in repl.

* module/mes/repl.mes (repl): Fix expand.  Remove sc-expand.
This commit is contained in:
Jan Nieuwenhuizen 2017-01-22 01:35:33 +01:00
parent 712403752d
commit e74a7584e9

View file

@ -96,7 +96,6 @@ along with Mes. If not, see <http://www.gnu.org/licenses/>.
"Help Commands:
,expand SEXP - Expand SEXP
,sc-expand SEXP - SC-expand SEXP
,help - Show this help
,show TOPIC - Show info on TOPIC [c, w]
,use MODULE - load MODULE
@ -113,25 +112,16 @@ along with Mes. If not, see <http://www.gnu.org/licenses/>.
(let ((count 0)
(print-sexp? #t))
(define (expand)
(define (expand a)
(lambda ()
(let ((sexp (read)))
(when #t print-sexp?
(display "[sexp=")
(display sexp)
(display "]")
(newline))
(display (core:macro-expand sexp))
(newline)))
(define (scexpand)
(let ((sexp (read)))
(when #t print-sexp?
(display "[sexp=")
(display sexp)
(display "]")
(newline))
(display (sc-expand sexp))
(newline)))
(display (eval (list core:macro-expand sexp) a))
(newline))))
(define (help . x) (display help-commands))
(define (show . x)
@ -145,8 +135,7 @@ along with Mes. If not, see <http://www.gnu.org/licenses/>.
(let ((module (read)))
(mes-load-module-env module a))))
(define (meta command a)
(let ((command-alist `((expand . ,expand)
(sc-expand . ,scexpand)
(let ((command-alist `((expand . ,(expand a))
(help . ,help)
(show . ,show)
(use . ,(use a)))))