[Top][All Lists]

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

Re: [Chicken-hackers] [PATCH] Fix line numbers in error messages inside

From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Fix line numbers in error messages inside modules
Date: Fri, 11 May 2012 13:57:05 +0200
User-agent: Mutt/

On Fri, May 11, 2012 at 01:45:13PM +0200, Felix wrote:
> > As you can see, all references to "+" mention line 1, while the actual
> > code is several lines lower (line 5).

Quoth Dr. Felix:

> I see. Hm.

> > Besides this annoying aspect, I think stripping entire modules is bad
> > practice.  If anything goes wrong by not stripping them, we should fix
> > that properly (by fixing the syntax env or wherever it goes wrong).
> > However, we don't have a single test that fails when not stripping them!
> > Compilation should also be faster by not running strip-syntax over
> > entire modules.
> If the module form is the result of a macro-expansion, then (at least)
> the export list will be invalid, as these need to be pure, unaliased
> names.

I was wondering and unsure about that.  How should this work?
For example, if I put a module definition in a LET statement, it doesn't
work at all, neither inside the LET nor outside (with or without my patch).
I'm not sure that's even supposed to work.  The s48-modules tests don't
work in compiled mode with the old or new versions either.  I think we
could have a look at that after 4.8.0 is released, since these are
rather unusual use-cases.

I guess the module name itself should be stripped as well as the exported
symbols, since modules are "global".  I guess that's also the reason
strip-syntax was being used.

> I have applied your patch and modified the processing of ##core#module
> to strip the export list.

Thank you!

> Installing s48-modules and installing/running prometheus seems to work ok.


"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

reply via email to

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