From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Lam Newsgroups: gmane.lisp.guile.user Subject: Re: Unbound variable warning/exception Date: Sun, 20 Dec 2020 23:11:38 +0000 Message-ID: References: <878s9s88iq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14677"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Dec 21 00:12:21 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 1kr7sD-0003hQ-2J for guile-user@m.gmane-mx.org; Mon, 21 Dec 2020 00:12:21 +0100 Original-Received: from localhost ([::1]:57876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr7sC-0000td-5c for guile-user@m.gmane-mx.org; Sun, 20 Dec 2020 18:12:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr7s1-0000sc-Va for guile-user@gnu.org; Sun, 20 Dec 2020 18:12:09 -0500 Original-Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:38293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kr7s0-0007eG-2z; Sun, 20 Dec 2020 18:12:09 -0500 Original-Received: by mail-ej1-x635.google.com with SMTP id 6so10974064ejz.5; Sun, 20 Dec 2020 15:12:07 -0800 (PST) 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=Nf1iVcotBnseZiUFegv9NUcC5+25WqrgW7LHuTSDJJ8=; b=I/Zs7z10yj4RA3vR6+05j1iwrhda/VMXyBIZmWMXPhkVBDuq20nhNUReADaKifTSnq arsIt9tYP1hBAdlWTqliuHk49WC2pd5fX3X5rErWHt33NPobhK+yg4xdivyjH7jC2a0c Vk29cVED35QA/LfL5jLnP4+WaGbt/jIWzEbxZrhX3LctGw3q0E2oH2J8HylJpZfw3EyI 3tiwkvKQmKsEnHDjx72E4eZF+uqpvIu+UU0GLllEBsXVL+G92ETXi6dqRK2mquyPuX3T SZfEZtqnO0BQBCpGik/NjYfL6WOHhdOAjulDc9iogN8OjjnFBI9fnmnMp9TwGZMnmlGC w3wA== 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=Nf1iVcotBnseZiUFegv9NUcC5+25WqrgW7LHuTSDJJ8=; b=feH/1Nb4RAWBrw/SthHCk8Nnbyx8jrnRGUcu3unxEZNcJO+wwYyfCTLWlTys5qgmLX duV16fZGnIe4OtmSmTGHH+RQuj+GP3rpxYU9aHVsCDaRXoGQHDZFNqxf0juZLvZYOgWd pnboeIA3y6mILiJxPf3b0lJuW3BFtz6kb9dxF7k0Ne3R+lVLLBoTW7CPpQk/9ITy+YsJ 6J9aaNHaJqV6cw/X97t7wsxxYgjwmSFyoa/MvdVVhGTgclUT3ZbvuNLgDbfqNtQXbD3a 9GAYBR3mCDI5Go87eDEYmJfMBOvDwQeDnY7XGepjtAuSQCMkFxPYH5yuB9El3cHD06By A4PA== X-Gm-Message-State: AOAM532VKqDPrUHyVAB906dthQdlhsA7dyqYKEqCizI+XUmwVhI1IIzX E08ZIW+aXBMBU5Bc8TsLwZThM8pEuF6nm5zXhb+QXBbkTVQ= X-Google-Smtp-Source: ABdhPJyLhhKuFYkihXy4WCU8kvfan8NVhHCLNOrfUF6ovrf0i5BCMoNA6j4Iq1zIqtewfEjpiRz05w/GgBoX4zEluQg= X-Received: by 2002:a17:906:af83:: with SMTP id mj3mr12764223ejb.243.1608505925710; Sun, 20 Dec 2020 15:12:05 -0800 (PST) In-Reply-To: <878s9s88iq.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=christopher.lck@gmail.com; helo=mail-ej1-x635.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:17096 Archived-At: The exception printer would be a good one to upgrade. The dilemma is whether to search available modules in the current repository, or in the whole of core guile. Do we want to show e.g. "Unbound variable: vector-for-each. Did you forget (use-modules (srfi srfi-43))" ? On Sun, 20 Dec 2020 at 21:36, Ludovic Court=C3=A8s wrote: > Hi, > > Aleix Conchillo Flaqu=C3=A9 skribis: > > > On Fri, Dec 18, 2020 at 5:26 PM Christopher Lam > > wrote: > >> > >> Hi guilers, I saw in guix the incredibly useful unbound-variable > exception > >> printer written by Ludovic. I've adapted for use in gnucash as > >> https://github.com/Gnucash/gnucash/commit/6f951784 -- there are now in > >> guile 3.0.4 many more unbound-var warnings than in 3.0.2 -- wouldn't i= t > be > >> a useful hint to add to the warning in core guile as well? > > > > Wow, this is great! > > > > This should definitely be added to guile by default. > > In Guix, the hint is displayed by an 'unbound-variable exception > handler, not by the 'unbound-variable printer; I think doing it in the > printer could be confusing. > > Perhaps what could be done is export an 'unbound-variable handler that > does all this, and have the REPL use it? > > Thanks, > Ludo=E2=80=99. > > >