[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Expansion of a macro

From: Panicz Maciej Godek
Subject: Re: Expansion of a macro
Date: Tue, 21 Apr 2015 08:13:42 +0200

Or you can (use-modules (system base compile) (srfi srfi-11))

and then

(define* (expand-form e #:key (opts '()))
  (let-values (((exp env) (decompile
                           (compile e #:from 'scheme
                                    #:to 'tree-il
                                    #:env (current-module))
                           #:from 'tree-il
                           #:to 'scheme
                           #:opts opts)))

(define-syntax-rule (expand _expression_)
  (expand-form '_expression_))

-- at least in guile 2.0

Sometimes it is also instructive to use the macro stepper shipped with Racket:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]