guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unbound variable warning/exception


From: Christopher Lam
Subject: Re: Unbound variable warning/exception
Date: Sun, 20 Dec 2020 23:11:38 +0000

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ès <ludo@gnu.org> wrote:

> Hi,
>
> Aleix Conchillo Flaqué <aconchillo@gmail.com> skribis:
>
> > On Fri, Dec 18, 2020 at 5:26 PM Christopher Lam
> > <christopher.lck@gmail.com> 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 it
> 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’.
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]