chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] how to use readline with (repl) to add repl to my progra


From: Matt Welland
Subject: [Chicken-users] how to use readline with (repl) to add repl to my programs?
Date: Sat, 11 Apr 2015 09:00:21 -0700


With 3.0 this fails due to toplevel-command not found:

(use readline apropos)
(import readline)
(import apropos)
(current-input-port (make-readline-port))
(install-history-file #f "/.csi.history")
(repl)

With 1.993 this worked:

(use readline apropos)
(import readline)
(import apropos)
(gnu-history-install-file-manager
         (string-append
          (or (get-environment-variable "HOME") ".") "/.megatest_history"))
(current-input-port (make-gnu-readline-port "megatest> "))
;; (current-input-port (make-readline-port))
;; (install-history-file #f "/.csi.history")
(repl)

Adding (import csi) doesn't help as I guess toplevel-command is not exported and defining a procedure:

(define (toplevel-command . a) #f)
(use readline)

works but it seems wrong. Also, calling (repl) works to give a repl but none of the toplevel , calls are there.

Any help on how to make toplevel calls available in a repl much appreciated. BTW, this feature of megatest (being able to extend it and use a repl) has been incredibly useful. Just one more thing to love about scheme and chicken in particular.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]