mit-scheme-devel
[Top][All Lists]
Advanced

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

Re: Unable to import R7RS libraries in the REPL


From: Amirouche Boubekki
Subject: Re: Unable to import R7RS libraries in the REPL
Date: Wed, 1 Dec 2021 19:19:23 +0100

The shell prompt starts with single `;`, the expected output of
`main.scm` program is:

  Hello schemer amirouche!

Here is the sh session:

; find .
.
./main.scm
./live
./live/hello
./live/hello/body.scm
./live/hello.sld

; find . -type f -exec sh -c "echo \";; cat {}\"; cat {}" \;
;; cat ./main.scm
(import (scheme base))
(import (scheme process-context))
(import (live hello))

(hello (get-environment-variable "USER"))
;; cat ./live/hello/body.scm
(define (hello name)
  (display "Hello schemer ")
  (display name)
  (display "!")
  (newline))
;; cat ./live/hello.sld
(define-library (live hello)
  (import (scheme base)
          (scheme write))
  (export hello)
  (cond-expand
   ((or mit chibi gambit gerbil loko)
    (include "hello/body.scm"))
   ;; That is the rule picked up by chicken
   (else (include "live/hello/body.scm"))))

; scheme-live mit repl
MIT/GNU Scheme running under GNU/Linux
Type `^C' (control-C) followed by `H' to obtain information about interrupts.

Copyright (C) 2020 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

Image saved on Wednesday December 1, 2021 at 7:12:38 PM
  Release 11.2 || SF || LIAR/x86-64

(find-scheme-libraries! ".")

;Registering library (live hello) from
"/home/amirouche/src/scheme/live/git/tmp/./live/hello.sld"... done
;Unspecified return value

(load "main.scm")

;Loading "main.scm"...
;  Loading "./live/hello.sld"... done
Hello schemer amirouche!
;... done
;Unspecified return value

1 ]=>



reply via email to

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