From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id 896E63858D32 for ; Thu, 2 Nov 2023 21:51:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 896E63858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 896E63858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698961895; cv=none; b=ZZeem5bYZPBgD9p7t9sTJGfsBToXMolMjTDkKA8gKOEk/nZ9MEX+Gbt+RbwetOFgIZ8LIt5itTMFPk5AUt6GDxOSn/BsqfKckB8Do1GZK8ixjjTSI24Mf135xtoHiGjvUxpIC+Nk0w2osHmvj0jwQycjtKnkqtHhdh+uj0Xpvuk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698961895; c=relaxed/simple; bh=Itwmr244d0ZVCn3CtSJi2CbQO7ptTZcoMu1Pmw+lhm0=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=RnIjFWDCryikiNr2RJOYwZip0PhDxrTFYPDoCHjcIJypJOWpezaq7SgUx7Iq6/tVaWg29LQ/sHywJE187rT0yezFM8CxD6+sp+2kbGbP4DEDRTynHNrLKvzYZpUvKsWI0QiydbF8xQiIyaycCCTk1+ZjCy06mcQgzt2/+a4Ccgs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-507b9408c61so1724489e87.0 for ; Thu, 02 Nov 2023 14:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698961883; x=1699566683; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XWGT0KZFjGmMUAolYaCyJ+MeEQ3nRERy//tkQ1e5Fno=; b=f354CEvS0CdHWiAZZMrMs0Sf8FvclYjTxvqNIN+pITF7+76evRLhX+1NmMXxoI7EjY 1W2J+3bycGO1FNcXv3PyC7/Z4DjsXh7ikzyW6CZCYVAHMqTHOZIB3YXEQ0vjlz22QLxD VaDeBfrLbb22DecbMx16Jde4jq7xWJX+LmwICZfqD4yXN0K6qTFm4t2r3cAX96rRMb2M lIkuIQ9sRtK97wKaMTTp2RIOn5R16EquTi+jAH3xB7xaBWR48s5OOts3YERsVV6YytXq ZPXW82xuR4mZXhRrxpsZ494v82f26cTM5hJeqYdYNC7pnF+trH4amnCRfcGa2yY+LyMT Z0CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698961883; x=1699566683; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XWGT0KZFjGmMUAolYaCyJ+MeEQ3nRERy//tkQ1e5Fno=; b=WoaKPK3mwTbJdtq6cPbg79pF27kKABBRmxCMjkangkGN3avYAp9v6DQk8Igxz+kA9K d6MXWVMeKn+vTNjZR1FgttVdVfPMGqVF3arsSZizJIv4IPZmRaz37LGymjMDu3d2g0LH Z9SFPz4r8wfWhfNq9mVAxp/3Ng1s2EKJ67VII7YGr7m07dfb8vlIZa4Ax4h4tddRLl0L dP+FhckylSh4NX+s+jgB9Pk5Lx2NIBgOuYy8fojbvuuxbDimtKvvdrSnUP/KPhHfyF1+ sgA9nz+VxvlJXFe+2H99K3iqzvA4QIrj0G6mi0SDsVJ2OY9N+otIFo9TXM9Rx0DJfQE9 t7PA== X-Gm-Message-State: AOJu0Yy33PyFM7frTVsTox32+VAyJGrgG7b6eBSN1G8WPeeXULwxJ/uA orkyHwXdc9l+yh5WplBnNvj9BVzDX2bMOOy1GjUg44o+Fo8= X-Google-Smtp-Source: AGHT+IFJSb39TrRSrWBXNIp3cUYux6mpww6w6fq47bols6V+O8cwTj30eFbpSiH+9aJNWQEmF7VQbRz8jqpM4qcY54E= X-Received: by 2002:a19:a40a:0:b0:507:9693:12aa with SMTP id q10-20020a19a40a000000b00507969312aamr14915401lfc.15.1698961882517; Thu, 02 Nov 2023 14:51:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Damien Mattei Date: Thu, 2 Nov 2023 22:51:05 +0100 Message-ID: Subject: Re: unbound location: * To: Per Bothner Cc: kawa mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,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: seems a good idea but i can not fix it, i try: (import (rename (gnu kawa) (proc orig-proc))) and (import (rename (overload) (proc orig-proc))) as my code is in module 'overload' but the latter result in a crash: main-test-define.scm:4:1: duplicate version reference - was # main-test-define.scm:4:1: unknown library (#) #|kawa:3|# + Exception in thread "main" java.lang.VerifyError: Bad local variable type Exception Details: Location: atInteractiveLevel-5.run(Lgnu/mapping/CallContext;)V @6: aload_3 Reason: Type top (current frame, locals[3]) is not assignable to reference type Current Frame: bci: @6 flags: { } locals: { 'atInteractiveLevel-5', 'gnu/mapping/CallContext', 'gnu/lists/Consumer' } stack: { 'gnu/lists/Consumer' } Bytecode: 0000000: 2bb4 0008 4d2c 2db9 000e 0200 b1 at java.base/java.lang.Class.getDeclaredFields0(Native Method) at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3473) at java.base/java.lang.Class.getDeclaredField(Class.java:2780) at gnu.expr.ModuleContext.findInstance(ModuleContext.java:71) at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:286) at gnu.expr.ModuleExp.evalModule(ModuleExp.java:211) at kawa.Shell.run(Shell.java:289) at kawa.Shell.run(Shell.java:196) at kawa.Shell.run(Shell.java:183) at kawa.repl.processArgs(repl.java:724) at kawa.repl.main(repl.java:830) my goal is just to back-up proc under the name orig-proc as i need to reuse it latter. On Wed, Nov 1, 2023 at 5:58=E2=80=AFPM Per Bothner wrote: > > > > On 11/1/23 09:47, Damien Mattei wrote: > > but i have no more access to previous definition that is not keep in > > the overloaded procedure,see #!null values: > > If you're using the module system, you can use import-with-rename > to access the "old" definition: > > (import (rename other-module (foo other-foo))) > (export foo) > > (define (foo ...) > (cond (xxx (other-foo ...)) > (else ...))) > > See https://www.gnu.org/software/kawa/Importing.html > -- > --Per Bothner > per@bothner.com http://per.bothner.com/