mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
Don't use module.scm.
This commit is contained in:
parent
9d3903dbed
commit
9419ff9ae9
6 changed files with 10 additions and 14 deletions
|
@ -19,7 +19,6 @@
|
|||
|
||||
(define-module (language ghil spec)
|
||||
:use-module (system base language)
|
||||
:use-module (system base module)
|
||||
:export (ghil))
|
||||
|
||||
(define-language ghil
|
||||
|
@ -27,5 +26,5 @@
|
|||
:version "0.3"
|
||||
:reader read
|
||||
:printer write
|
||||
:environment (make-vmodule)
|
||||
;; :environment (make-vmodule)
|
||||
)
|
||||
|
|
|
@ -194,9 +194,9 @@
|
|||
(export current-vmodule set-current-vmodule!
|
||||
current-evaluator set-current-evaluator!)
|
||||
|
||||
(define *current-module* #f)
|
||||
(define (current-vmodule) *current-module*)
|
||||
(define (set-current-vmodule! m) (set! *current-module* m))
|
||||
(define *current-vmodule* #f)
|
||||
(define (current-vmodule) *current-vmodule*)
|
||||
(define (set-current-vmodule! m) (set! *current-vmodule* m))
|
||||
|
||||
(define *current-evaluator* #f)
|
||||
(define (current-evaluator) *current-evaluator*)
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
(define-module (system repl command)
|
||||
:use-module (oop goops)
|
||||
:use-syntax (system base syntax)
|
||||
:use-module (system base module)
|
||||
:use-module (system base language)
|
||||
:use-module (system repl common)
|
||||
:use-module (system il glil)
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
(define-module (system repl common)
|
||||
:use-module (oop goops)
|
||||
:use-syntax (system base syntax)
|
||||
:use-module (system base module)
|
||||
:use-module (system base language)
|
||||
:use-module (system vm core)
|
||||
:export (make-repl repl-welcome repl-prompt repl-read repl-compile
|
||||
|
@ -41,7 +40,7 @@
|
|||
(make <repl>
|
||||
:vm vm
|
||||
:language (lookup-language lang)
|
||||
:module (global-ref 'user)
|
||||
:module #f ;; (global-ref 'user)
|
||||
:value-count 0
|
||||
; :value-history (make-vmodule)
|
||||
:tm-stats (times)
|
||||
|
@ -55,7 +54,8 @@
|
|||
(display "Enter `,help' for help.\n"))
|
||||
|
||||
(define (repl-prompt repl)
|
||||
(format #t "~A@~A> " repl.language.name (env-identifier repl.module))
|
||||
(format #t "~A@~A> " repl.language.name 'guile)
|
||||
;; (env-identifier repl.module))
|
||||
(force-output))
|
||||
|
||||
(define (repl-read repl . args)
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
(define-module (system repl repl)
|
||||
:use-syntax (system base syntax)
|
||||
:use-module (system base module)
|
||||
:use-module (system repl common)
|
||||
:use-module (system repl command)
|
||||
:use-module (system vm frame)
|
||||
|
@ -30,8 +29,8 @@
|
|||
|
||||
(define (start-repl lang)
|
||||
(let ((repl (make-repl lang)))
|
||||
(set-current-vmodule! repl.module)
|
||||
(set-current-evaluator! repl.vm)
|
||||
;; (set-current-vmodule! repl.module)
|
||||
;; (set-current-evaluator! repl.vm)
|
||||
(repl-welcome repl)
|
||||
(let prompt-loop ()
|
||||
(repl-prompt repl)
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
(define-module (system vm load)
|
||||
:use-module (system vm core)
|
||||
:autoload (system base module) (global-ref)
|
||||
:autoload (system base language) (compile-file-in lookup-language)
|
||||
:use-module (ice-9 regex)
|
||||
:export (load/compile))
|
||||
|
@ -33,7 +32,7 @@
|
|||
(compiled (object-file-name file)))
|
||||
(if (or (not (file-exists? compiled))
|
||||
(> (stat:mtime (stat file)) (stat:mtime (stat compiled))))
|
||||
(compile-file-in file (global-ref 'user) (lookup-language 'r5rs)))
|
||||
(compile-file-in file #f (lookup-language 'r5rs)))
|
||||
(let ((bytes (make-uniform-vector (stat:size (stat compiled)) #\a)))
|
||||
(call-with-input-file compiled
|
||||
(lambda (p) (uniform-vector-read! bytes p)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue