Unbound binding forms give bad error messages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
New
|
Undecided
|
Unassigned |
Bug Description
Perhaps this isn't a bug, since evaluation order is unspecified. But when I have written a macro that expands into a binding form (such as exists in miniKanren), and forget to load it, I get a very misleading error message. For example:
joenear@aybars ~ $ ikarus
Ikarus Scheme version 0.0.3+ (revision 1492, build 2008-05-30)
Copyright (c) 2006-2008 Abdulaziz Ghuloum
> fluid-let
Unhandled exception
Condition components:
1. &assertion
2. &who: eval
3. &message: "unbound variable"
4. &irritants: (fluid-let)
> (fluid-let ((x 5)) x)
Unhandled exception
Condition components:
1. &assertion
2. &who: eval
3. &message: "unbound variable"
4. &irritants: (x)
>
I expected to see that fluid-let was unbound, not that x was. Chez gives a more helpful message:
joenear@aybars ~ $ petite
Petite Chez Scheme Version 7.3
Copyright (c) 1985-2006 Cadence Research Systems
> (luid-let ((x 5)) x)
Error: variable luid-let is not bound.
Type (debug) to enter the debugger.
>
(fluid-let has been changed to luid-let since Chez has fluid-let).