From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.user Subject: Re: Programmatically expand macros Date: Sat, 20 Jun 2020 17:53:40 +0200 Message-ID: References: <390878b4-f329-4a52-9ec5-1fb65bfd9256@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="20209"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jun 20 17:54:07 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jmfol-0005AZ-8R for guile-user@m.gmane-mx.org; Sat, 20 Jun 2020 17:54:07 +0200 Original-Received: from localhost ([::1]:54432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmfok-0000lY-0g for guile-user@m.gmane-mx.org; Sat, 20 Jun 2020 11:54:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmfoa-0000ii-5d for guile-user@gnu.org; Sat, 20 Jun 2020 11:53:56 -0400 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:40408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmfoY-00085F-Kr for guile-user@gnu.org; Sat, 20 Jun 2020 11:53:55 -0400 Original-Received: by mail-wm1-x32e.google.com with SMTP id r15so11674517wmh.5 for ; Sat, 20 Jun 2020 08:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0M8ZYDeLx7b6wj3NRzPZEG97z2ZshP+rOLjBPlVmhLI=; b=uC9OKBfrUy7uHgCq6JuT+CnaywRrCUQAyiiBwZLqx+Jwec1TXXD5fPJdFaj1C4ZcM0 ZOK9VcyFkci467tE+iPnb4CKs4ga5zz/X24r6CUAzBZ8S3c/J7sTDaxwP7ygoTsYZtdp 1Dj+atd5iMhOnHs3hmqNKgtm6eE4tP975rKWqvhaYX0ZYiYPJOzy9tIAa1D7i7nC1qeq X9QQEybUk6hmMXAKwgjxkkbnwOT9p1R0xPWWSBtoq9skVqZeyyATE4zajzyfheXOeUlW 580F22YRILsEwZ8rKW6qdKaytdLZdfRUIJv9Vbsr505vfxG2vEQpMFAKsSWa7H8kJd+Y l8ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0M8ZYDeLx7b6wj3NRzPZEG97z2ZshP+rOLjBPlVmhLI=; b=L2pbsBEElc6c0Aa+f3dlJrXF8Y7VcNvBwOBwEagDdY0oPCmcA1IepAHBh2/TIwWvh4 UXoZUEnHXKdaIngf7MkGJmS/YKazt/yqHZisOhTwyiQUYoc6SymoUqZkDFzerPTe555O CHewLoXYSz9CWG1H3+5X9zDS4UGNbiRTsmBEjt/xuJYNphZV1lLs17ONb6IwjNNsKyO0 KkW73buxFP7cUCYS6JW9khaKES6McV5rCPxvDLf7f0kpxYuerKZx/DetiIodntdLaKAc BgXT7pO6EtbxP3n8JeaNE/j5voUqsZfUUZazpRoiAFHR9QJhMJNCCiUq/jnhyC45OQc+ J6+Q== X-Gm-Message-State: AOAM533LIigp3tQov65b+ZtsjTq9sJjQJqjU0QErLQFWzWW0YZ7hAJLU oDM5182mo4YeStVkN4on8/tsDnXivbjinXfNgTOwaA== X-Google-Smtp-Source: ABdhPJwdpIYjETONxQfJrz6CgKlT8OsHqCrx+83ISfmKZ06XRlYfraXnbCVUH/TF2YtD5wGMBTtkNxic7XQS+Qs0aTE= X-Received: by 2002:a7b:c243:: with SMTP id b3mr1619409wmj.116.1592668432503; Sat, 20 Jun 2020 08:53:52 -0700 (PDT) In-Reply-To: <390878b4-f329-4a52-9ec5-1fb65bfd9256@www.fastmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=stefan.itampe@gmail.com; helo=mail-wm1-x32e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16599 Archived-At: There is a small macro tool that will expand the arguments before calling the macros body. Forgot its name. This is closest you get with what you are asking for. Its a really cool macrology based on syntax rules. Its included in guile standard. On Tue, 16 Jun 2020, 19:59 Linus Bj=C3=B6rnstam, wrote: > Hi! > > Is there any simple way to programmatically expand a macro? I already hav= e > a PoC that uses syntax-local-binding, but that is quite complex. > > Say I have a macro called (hej body ...), can I in any simple way expand > (body ...) so that all macros within are expanded? Without relying on > syntax-local-value and doing it all myself, that is. > > Best regards > Linus Bj=C3=B6rnstam > >