From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei Newsgroups: gmane.lisp.guile.user Subject: macro syntax-error works in prefix but not curly-infix Date: Sat, 4 Sep 2021 16:41:41 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21065"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Sep 04 16:42:29 2021 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 1mMWsH-0005LP-6J for guile-user@m.gmane-mx.org; Sat, 04 Sep 2021 16:42:29 +0200 Original-Received: from localhost ([::1]:49246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMWsF-0007OU-L8 for guile-user@m.gmane-mx.org; Sat, 04 Sep 2021 10:42:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMWrk-0007O7-Kr for guile-user@gnu.org; Sat, 04 Sep 2021 10:41:56 -0400 Original-Received: from mail-yb1-xb35.google.com ([2607:f8b0:4864:20::b35]:40603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMWrh-0003oN-UR for guile-user@gnu.org; Sat, 04 Sep 2021 10:41:56 -0400 Original-Received: by mail-yb1-xb35.google.com with SMTP id e131so4120864ybb.7 for ; Sat, 04 Sep 2021 07:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=eXpelKU66dTX2jRx91CxD7bR/mZlT2V530iQnQM2yaQ=; b=Wnab3/flab1J267QUf8mv65K73fOAhTE60E9rwC55MjSdIu02uiC0j5H/5OTziQrEN 80b1Giv6TAVwnJpt2IcPvMGNO2fIa3UJLtRyzOOQtbfhSP0PGxwb16rQeJfJDMfL2kAG Ihu61l7DpL+clHnLRyMWM5u/SfJDMSUMWQWlFWD+/9Ze/GGe3y+mSmY9sBqEBW2bCvAR trrHh9u/X3PfBLcC0SUKxiRglmSd+J3BJXM7WtTJY+xEUv4WbTUzj68vbgxpk8QeUhOu XS1OpPVIu6ZThCXUBmY3VcuCEGz0GWRH4syNWUxN0EqdF6bOtmFCoUagL+fMzUzRUXRq J7pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=eXpelKU66dTX2jRx91CxD7bR/mZlT2V530iQnQM2yaQ=; b=kNpRRFYM15EsksC21CsTcbrRnYM58wR48iuko1Jpqx/8uaoLShX7Qqnksw3tNE6V+g HjOkP79iMBTdzNu0bqpuxvdgcgG32bpfvCoWSCccdrTq55ZJmR5Or8KYrXunjiD4nIrQ qbOvRY3ZsykSjdDnKcwRwA3D3G8ANwZP7i22t0cyDkViXCjOK+t7P2UhLuknCxIYJikI F5+WJ+dFdjqsMm08FZGHV31kpMMaN2237LzYgSGfAzTshGVdISnO0W7uOBjAAWdjoiPQ OgjmsQDQMqzOGQhka66eTKXqaTZFQRgViNw5VUNvhuaqA33kJ2f7Im17KvF6lWtYwjqr lRXg== X-Gm-Message-State: AOAM532S6ND0b9tXnMxbwtsHUMJ0IcpSfkyb5GpVxTdsI3dNVo52BmOZ pnKZxufZyjQlFZpqGDwuf9t1qCWy5WNwjt+TXIUArmPeU1VcLw== X-Google-Smtp-Source: ABdhPJwMdVgWltPrztg8YVtnNN6j5DIeXCnjpPbYbIWPUJCyS4RzMnK2FxTKsmQJ3bLdaoiW1bQv6mRDISeulnk58e4= X-Received: by 2002:a05:6902:70d:: with SMTP id k13mr5184402ybt.387.1630766512226; Sat, 04 Sep 2021 07:41:52 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::b35; envelope-from=damien.mattei@gmail.com; helo=mail-yb1-xb35.google.com 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=ham autolearn_force=no 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:17710 Archived-At: hi, i have this macro: (define-syntax <+ (syntax-rules () ((_ var expr) (define var expr)) ((_ err ...) (syntax-error "Bad <- form")) ;; does not work in infix ! )) why my syntax-error pattern never reach in infix: scheme@(guile-user)> {x <+ 7 8} While compiling expression: Syntax error: unknown file:3:3: source expression failed to match any pattern in form <+ but ok in prefix: scheme@(guile-user)> (<+ x 9 10) While compiling expression: Syntax error: unknown location: <+: Bad <- form in form (<+ x 9 10) why? Regards, Damien