define-type no longer expects `|' subform
authorAndy Wingo <wingo@pobox.com>
Fri, 24 Oct 2008 09:09:43 +0000 (11:09 +0200)
committerAndy Wingo <wingo@pobox.com>
Sat, 25 Oct 2008 20:58:48 +0000 (22:58 +0200)
* 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.

module/system/base/syntax.scm
module/system/il/ghil.scm
module/system/il/glil.scm

index 1fd6072..3172e3d 100644 (file)
 (define-module (system base syntax)
   #:export (%compute-initargs)
   #:export-syntax (define-type define-record record-case))
-(export-syntax |) ;; emacs doesn't like the |
 
 \f
 ;;;
 ;;; Type
 ;;;
 
-(define-macro (define-type name sig) sig)
+(define-macro (define-type name . rest)
+  `(begin ,@(map (lambda (def) `(define-record ,def)) rest)))
+
 
 ;;;
 ;;; Record
                  (if (assq 'else clauses)
                      clauses
                      (append clauses `((else (error "unhandled record" ,r))))))))))
-
-
-\f
-;;;
-;;; Variants
-;;;
-
-(define-macro (| . rest)
-  `(begin ,@(map (lambda (def) `(define-record ,def)) rest)))
index 92f4df3..c0acd5b 100644 (file)
 ;;;
 
 (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))
+
 
 \f
 ;;;
index 75fca06..d26ba16 100644 (file)
 (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))
 
 \f
 ;;;