From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailtransmit05.runbox.com (mailtransmit05.runbox.com [IPv6:2a0c:5a00:149::26]) by sourceware.org (Postfix) with ESMTPS id CD1133858296 for ; Fri, 3 Nov 2023 17:35:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD1133858296 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bothner.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bothner.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CD1133858296 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a0c:5a00:149::26 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699032934; cv=none; b=s1BQ5UOltrzWaVWVvKcdtvEgGKsGp5eu7hYOPycmuB7dIg+RrnjiFPqB6OB0N996Cqf62XUEG3jSEaeB+9u/EyTfO4PXIVk/bmiezXMVuajpjgDAL0uCEwWCRJpmbPAOFIiemRhN40zTdRrtE5esAJ5YuKOl2IeExv0ddFbsmaE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699032934; c=relaxed/simple; bh=KNGJYObTronVXK5/x1o1WgCiCNz1pBXS/KUbM3PKXH8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=yDMB1gmmymC1T2nrP2dB36o9KqDblLb0uaGxXLY7MHRO2OOo2ZdLEpfoIc/FuIDwfdvUHA0a64O0l25SeP6N3EbxOS4vOLheLSz93I4hG8fEKchU4KSxwkUwREq+ps9mwjGf1gvMtjy+L3V3Vfx+2OVIH/mYefqNH+Aan0nqeCU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1qyy4n-003hrc-Gh for kawa@sourceware.org; Fri, 03 Nov 2023 18:35:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bothner.com ; s=selector1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID; bh=JlU8uhZWooQ2ZXcNPKeTrg3tJqcb7b5Sn4UToObvM+o=; b=XbFlxs9wbonozIvG97ymW+iU4p VNSRhwHpHexw3hp/S2O0M5odD2N7ErnxBcq5l56zwAOg0qHKwOPkWS42MoOu1b/xieYPs4OcXcw21 gMbrVTDwLIWLxApDSAAn0dH4SDP7PJWVTbLdxBC+8K4qJH4EAR3G7qLpUXqxdSEg+bk7AbwawGeAX X1chJMlFXtz7QZQjOHMVXfL7Wu083zqEaH5Ih5EPU53g5UPtrexfVauOhYb0+awtVakL2fKF7yWCg 1ZG+G0kgN0v5muROwqjBoolf5At0k829OEnoUoO61Yw1Q1c1iJ/g6ozQXMqZV41B5Ka2cN7sa9uxt edpJZOng==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1qyy4n-0006T4-2N for kawa@sourceware.org; Fri, 03 Nov 2023 18:35:21 +0100 Received: by submission02.runbox with esmtpsa [Authenticated ID (524175)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1qyy4e-003sGK-A6 for kawa@sourceware.org; Fri, 03 Nov 2023 18:35:12 +0100 Message-ID: Date: Fri, 3 Nov 2023 10:35:04 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: duplicate version reference - was # Content-Language: en-US To: kawa@sourceware.org References: From: Per Bothner In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/3/23 10:25, Damien Mattei via Kawa wrote: > but if i put the statement in a macro, it no more works: > kawa -Dkawa.import.path="." > #|kawa:1|# (define-syntax define-overload-existing-operator > #|.....2|# > #|.....3|# (syntax-rules () > #|.....4|# > #|.....5|# ((_ proc) (import (rename (scheme base) (proc orig-proc)))))) > #|kawa:6|# (define-overload-existing-operator +) > /dev/tty:6:1: duplicate version reference - was # > /dev/tty:6:1: unknown library (#) To start with, orig-proc is undefined. proc and orig-proc are completely unrelated identifiers. Generating a new identifier orig-proc based on an existing identifier proc is possible (using syntax->datum and datum->syntax) but it's tricky. Using import in a macro expansion may have some issues or bugs I haven't really thought about, at least not in a long time. -- --Per Bothner per@bothner.com http://per.bothner.com/