diff options
author | Andy Wingo <wingo@pobox.com> | 2008-10-24 11:09:43 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2008-10-25 22:58:48 +0200 |
commit | 1086fabdc9452846f1b269da7faf2022b5cc7472 (patch) | |
tree | 3e8878699722625d40b648d11dc67b6ff93322f8 | |
parent | f9d44e84761a2898671deb10ad538aad04f232ab (diff) | |
download | guile-1086fabdc9452846f1b269da7faf2022b5cc7472.tar.gz |
define-type no longer expects `|' subform
* module/system/base/syntax.scm (define-type): Rework to not require the
`|', which confuses Emacs.
* module/system/il/ghil.scm (<ghil>):
* module/system/il/glil.scm (<glil>): Adapt to define-type changes.
-rw-r--r-- | module/system/base/syntax.scm | 14 | ||||
-rw-r--r-- | module/system/il/ghil.scm | 48 | ||||
-rw-r--r-- | module/system/il/glil.scm | 41 |
3 files changed, 47 insertions, 56 deletions
diff --git a/module/system/base/syntax.scm b/module/system/base/syntax.scm index 1fd607268..3172e3dee 100644 --- a/module/system/base/syntax.scm +++ b/module/system/base/syntax.scm @@ -22,14 +22,15 @@ (define-module (system base syntax) #:export (%compute-initargs) #:export-syntax (define-type define-record record-case)) -(export-syntax |) ;; emacs doesn't like the | ;;; ;;; Type ;;; -(define-macro (define-type name sig) sig) +(define-macro (define-type name . rest) + `(begin ,@(map (lambda (def) `(define-record ,def)) rest))) + ;;; ;;; Record @@ -108,12 +109,3 @@ (if (assq 'else clauses) clauses (append clauses `((else (error "unhandled record" ,r)))))))))) - - - -;;; -;;; Variants -;;; - -(define-macro (| . rest) - `(begin ,@(map (lambda (def) `(define-record ,def)) rest))) diff --git a/module/system/il/ghil.scm b/module/system/il/ghil.scm index 92f4df3c1..c0acd5bd0 100644 --- a/module/system/il/ghil.scm +++ b/module/system/il/ghil.scm @@ -104,30 +104,30 @@ ;;; (define-type <ghil> - (| - ;; Objects - (<ghil-void> env loc) - (<ghil-quote> env loc obj) - (<ghil-quasiquote> env loc exp) - (<ghil-unquote> env loc exp) - (<ghil-unquote-splicing> env loc exp) - ;; Variables - (<ghil-ref> env loc var) - (<ghil-set> env loc var val) - (<ghil-define> env loc var val) - ;; Controls - (<ghil-if> env loc test then else) - (<ghil-and> env loc exps) - (<ghil-or> env loc exps) - (<ghil-begin> env loc exps) - (<ghil-bind> env loc vars vals body) - (<ghil-mv-bind> env loc producer vars rest body) - (<ghil-lambda> env loc vars rest meta body) - (<ghil-call> env loc proc args) - (<ghil-mv-call> env loc producer consumer) - (<ghil-inline> env loc inline args) - (<ghil-values> env loc values) - (<ghil-values*> env loc values))) + ;; Objects + (<ghil-void> env loc) + (<ghil-quote> env loc obj) + (<ghil-quasiquote> env loc exp) + (<ghil-unquote> env loc exp) + (<ghil-unquote-splicing> env loc exp) + ;; Variables + (<ghil-ref> env loc var) + (<ghil-set> env loc var val) + (<ghil-define> env loc var val) + ;; Controls + (<ghil-if> env loc test then else) + (<ghil-and> env loc exps) + (<ghil-or> env loc exps) + (<ghil-begin> env loc exps) + (<ghil-bind> env loc vars vals body) + (<ghil-mv-bind> env loc producer vars rest body) + (<ghil-lambda> env loc vars rest meta body) + (<ghil-call> env loc proc args) + (<ghil-mv-call> env loc producer consumer) + (<ghil-inline> env loc inline args) + (<ghil-values> env loc values) + (<ghil-values*> env loc values)) + ;;; diff --git a/module/system/il/glil.scm b/module/system/il/glil.scm index 75fca0621..d26ba16b2 100644 --- a/module/system/il/glil.scm +++ b/module/system/il/glil.scm @@ -75,27 +75,26 @@ (define-record (<glil-vars> nargs nrest nlocs nexts)) (define-type <glil> - (| - ;; Meta operations - (<glil-asm> vars meta body) - (<glil-bind> vars) - (<glil-mv-bind> vars rest) - (<glil-unbind>) - (<glil-source> loc) - ;; Objects - (<glil-void>) - (<glil-const> obj) - ;; Variables - (<glil-argument> op index) - (<glil-local> op index) - (<glil-external> op depth index) - (<glil-toplevel> op name) - (<glil-module> op mod name public?) - ;; Controls - (<glil-label> label) - (<glil-branch> inst label) - (<glil-call> inst nargs) - (<glil-mv-call> nargs ra))) + ;; Meta operations + (<glil-asm> vars meta body) + (<glil-bind> vars) + (<glil-mv-bind> vars rest) + (<glil-unbind>) + (<glil-source> loc) + ;; Objects + (<glil-void>) + (<glil-const> obj) + ;; Variables + (<glil-argument> op index) + (<glil-local> op index) + (<glil-external> op depth index) + (<glil-toplevel> op name) + (<glil-module> op mod name public?) + ;; Controls + (<glil-label> label) + (<glil-branch> inst label) + (<glil-call> inst nargs) + (<glil-mv-call> nargs ra)) ;;; |