mes: Upgrade Guile module support.

* module/mes/boot-0.scm (define-module): New macro with minimal Guile support.
  (use-modules): New macro.
This commit is contained in:
Jan Nieuwenhuizen 2018-04-29 18:35:22 +02:00
parent a2e9a6925c
commit 08d6c24263
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
5 changed files with 9 additions and 6 deletions

View file

@ -220,6 +220,15 @@
(mes-use-module (mes catch)) (mes-use-module (mes catch))
(mes-use-module (mes posix)) (mes-use-module (mes posix))
(define-macro (define-module module . rest)
`(if ,(and (pair? module)
(= 1 (length module))
(symbol? (car module)))
(define (,(car module) . arguments) (main (command-line)))))
(define-macro (use-modules . rest) #t)
;; ;; end boot-0.scm ;; ;; end boot-0.scm
(mes-use-module (mes getopt-long)) (mes-use-module (mes getopt-long))

View file

@ -26,5 +26,4 @@
(mes-use-module (srfi srfi-9)) (mes-use-module (srfi srfi-9))
(mes-use-module (srfi srfi-13)) (mes-use-module (srfi srfi-13))
(mes-use-module (mes optargs)) (mes-use-module (mes optargs))
(define-macro (define-module module . rest) #t)
(include-from-path "mes/getopt-long.scm") (include-from-path "mes/getopt-long.scm")

View file

@ -32,7 +32,6 @@
(define-macro (set-procedure-property! proc key value) (define-macro (set-procedure-property! proc key value)
proc) proc)
(define-macro (define-module module . rest) #t)
(include-from-path "mes/optargs.scm") (include-from-path "mes/optargs.scm")
(define-macro (define-macro* NAME+ARGLIST . BODY) (define-macro (define-macro* NAME+ARGLIST . BODY)

View file

@ -22,9 +22,6 @@
;;; Code: ;;; Code:
(define-macro (define-module module . rest) #t)
(define-macro (use-modules . rest) #t)
;;(mes-use-module (mes guile)) ;;(mes-use-module (mes guile))
(mes-use-module (mes quasiquote)) (mes-use-module (mes quasiquote))
(mes-use-module (mes syntax)) (mes-use-module (mes syntax))

View file

@ -22,6 +22,5 @@
;;; Code: ;;; Code:
(define-macro (define-module module . rest) #t)
(define (cond-expand-provide . rest) #t) (define (cond-expand-provide . rest) #t)
(include-from-path "srfi/srfi-16.scm") (include-from-path "srfi/srfi-16.scm")