This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bug in modules?


On Sun, Aug 06, 2000 at 11:32:14PM +0200, Marius Vollmer wrote:
> [ Please post bug reports to <bug-guile@gnu.org>. ]
> 
> Ivan Toshkov <ivant@ifao.net> writes:
> 
> > Here is the test module, with missing closing paren:
> > 
> > ---------------
> > (define-module (test))
> > 
> > (define (some-buggy-proc a)
> >   a
> > 
> > ---------------
> > 
> > $ guile
> > guile> (version)
> > "1.4"
> > guile> (use-modules (test))
> > ERROR: In procedure list:
> > ERROR: end of file in
> 
> I think the most useful thing to add here is the name of the file that
> has the premature end.  This name might not be apparent when loading
> modules.  I have done this.
> 

I think that it will be useful to know the procedure name, too.

> > ABORT: (misc-error)
> > guile> (use-modules (test))
> 
> It is a consequence of how the module system works that you do not
> receive a second error message here.  The module is already loaded
> (although not completely) and it will not be loaded again when you
> request it another time.

Hmm, that sounds like a bug to me.  Wouldn't it be better if the
module is considered loaded only if there were no errors during load?

> 
> One error message should be enough, I think.

Not in this case, because it's ambiguous.  For example, if one changed
the module code before attempting to load it the second time, he (read
I) will think that it's loaded correctly.

-- 
Ivan Toshkov

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]