Commit 7a0bc3b6 authored by Erick Gallesio's avatar Erick Gallesio

ScmPkg simplification (records and exceptions removed)

parent 5ae2fa7c
......@@ -18,7 +18,7 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 5-Mar-2007 07:45 (eg)
# Last file update: 8-Mar-2007 14:18 (eg)
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
......@@ -236,7 +236,6 @@ scheme_SRCS = STklos.init \
make-C-boot.stk \
match.stk \
pp.stk \
snow-support.stk \
slib.stk \
srfi-1.stk \
srfi-2.stk \
......@@ -271,7 +270,6 @@ scheme_OBJS = compfile.ostk \
lex-rt.ostk \
match.ostk \
pp.ostk \
snow-support.ostk \
srfi-1.ostk \
srfi-2.ostk \
srfi-4.ostk \
......
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 11-Dec-2006 14:39 (eg)
;;;; Last file update: 7-Mar-2007 20:36 (eg)
;;;; Last file update: 8-Mar-2007 16:49 (eg)
;;;;
......@@ -35,8 +35,9 @@
exports
macros
syntaxes
exceptions
records)
;;// exceptions
;;// records
)
(define (%new-scmpkg-package name)
(make-scmpkg-package name ; name
......@@ -48,8 +49,8 @@
'() ; exports
'() ; macros
'() ; syntaxes
'() ; exceptions
'() ; records
;;// '() ; exceptions
;;// '() ; records
))
......@@ -101,14 +102,14 @@
;;// ,@(map (lambda (x)
;;// (eprintf "Syntax definition ~S\n" x))
;;// (reverse (scmpkg-package-syntaxes pkg)))
;; Exceptions
,@(map (lambda (x)
`(define-scmpkg-exception ,@x))
(reverse (scmpkg-package-exceptions pkg)))
;; Records
,@(map (lambda (x)
`(define-exported-record ,(car x) ,@(cdr x)))
(reverse (scmpkg-package-records pkg)))
;;// ;; Exceptions
;;// ,@(map (lambda (x)
;;// `(define-scmpkg-exception ,@x))
;;// (reverse (scmpkg-package-exceptions pkg)))
;;// ;; Records
;;// ,@(map (lambda (x)
;;// `(define-exported-record ,(car x) ,@(cdr x)))
;;// (reverse (scmpkg-package-records pkg)))
;; Body
(include ,(scmpkg-package-source pkg)))
;; Provide
......@@ -140,10 +141,10 @@
(%push! (scmpkg-package-macros pkg) rest))
((syntax ?args . ?-) ;; export a syntax
(%push! (scmpkg-package-syntaxes pkg) args))
((exception . ?rest) ;; export an exception
(%push! (scmpkg-package-exceptions pkg) rest))
((record ?name . ?body)
(%push! (scmpkg-package-records pkg) (cons name body)))
;;// ((exception . ?rest) ;; export an exception
;;// (%push! (scmpkg-package-exceptions pkg) rest))
;;// ((record ?name . ?body)
;;// (%push! (scmpkg-package-records pkg) (cons name body)))
(else
(%push! exports (car x))))))
(scmpkg-package-exports pkg))
......@@ -186,4 +187,5 @@
;; ======================================================================
(export scmpkg-package-exports scmpkg-package-imports scmpkg-package-language
scmpkg-package-exceptions scmpkg-package-records scmpkg-package-source)
;;// scmpkg-package-exceptions scmpkg-package-records
scmpkg-package-source)
......@@ -21,24 +21,25 @@
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 7-Feb-2007 11:03 (eg)
;;;; Last file update: 5-Mar-2007 23:34 (eg)
;;;; Last file update: 8-Mar-2007 16:45 (eg)
;;;;
;; ======================================================================
;; ScmPkg Runtime
;; ======================================================================
(define-condition-type &type-error &message &type-error?)
(include "ScmPkg.d/scmpkg-runtime.stk")
(define (exception-get-message cond)
(if (condition? cond)
(if (condition-has-type? cond &message)
(condition-ref cond 'message)
(format "condition of type ~S raised" (struct-type-name (struct-type cond))))
(error "bad exception ~S" cond)))
;;//(define-condition-type &type-error &message &type-error?)
;;//(include "ScmPkg.d/scmpkg-runtime.stk")
;;//
;;//
;;//(define (exception-get-message cond)
;;// (if (condition? cond)
;;// (if (condition-has-type? cond &message)
;;// (condition-ref cond 'message)
;;// (format "condition of type ~S raised" (struct-type-name (struct-type cond))))
;;// (error "bad exception ~S" cond)))
;;//
;;//
;; ======================================================================
;; The ScmPkg STklos module
......@@ -46,10 +47,10 @@
(define-module |ScmPkg|
(include "ScmPkg.d/scmpkg-languages.stk")
(include "ScmPkg.d/scmpkg-interface.stk")
(include "ScmPkg.d/scmpkg-exception.stk")
(include "ScmPkg.d/scmpkg-parameter.stk")
(include "ScmPkg.d/scmpkg-define.stk")
(include "ScmPkg.d/scmpkg-record.stk")
; (include "ScmPkg.d/scmpkg-exception.stk")
; (include "ScmPkg.d/scmpkg-parameter.stk")
; (include "ScmPkg.d/scmpkg-define.stk")
; (include "ScmPkg.d/scmpkg-record.stk")
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment