bug-guile
[Top][All Lists]
Advanced

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

[FIXED:] `thunk?' broken


From: Dirk Herrmann
Subject: [FIXED:] `thunk?' broken
Date: Thu, 19 Apr 2001 17:34:17 +0200 (MEST)

On Wed, 18 Apr 2001, Dirk Herrmann wrote:

> > Isn't there a `break' or `return' or something missing after the first
> > case?  I'm not sure about the correct fix, because I don't understand
> > all the procedure types in Guile yet.
> 
> You are right:  for the case of closures the code should be
>   if (SCM_NULLP (SCM_CAR (SCM_CODE (obj))))
>     return SCM_BOOL_T;
>   else
>     return SCM_BOOL_F;
> or shorter
>   return SCM_BOOL (SCM_NULLP (SCM_CAR (SCM_CODE (obj))));
> For the other cases it is OK.

Well, not quite.  I forgot that (lambda args ...) should also considered a
thunk.  However, I hope that the problem is fixed now.

Since I had to figure out about the representation of formal arguments in
a closure object, I also took the freedom to replace occurrences of
  SCM_CAR (SCM_CODE (obj))
throughout guile by a new SCM_CLOSURE_FORMALS macro, which does the same
thing but is more explicit.  Further, printing of macros is now done
within macros.c, and no longer in print.c...

Best regards,
Dirk Herrmann




reply via email to

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