Closed GoogleCodeExporter closed 8 years ago
I agree that it would be useful to have better runtime diagnostics for
failed_cond
and failed_match exceptions, but it's difficult to implement this in an
efficient way
and in any case it would require a major overhaul of the compiler.
None of the relevant information is currently available at runtime. In fact, it
is
not even available to the compiler, as the actual code generation may take
place long
after the source has been parsed, and source locations aren't currently
recorded in
the compiler's internal data structures. Also, the "source" may actually be a
string
evaluated at runtime, so meaningful source locations can't always be given.
The information that *is* available during compilation is the stack of lexical
environments leading up to the construct (case, when, lambda, if-then-else)
which
might cause one of these exceptions. But these don't always give meaningful
information either, as most or all of the closures might be anonymous.
I'm leaving this issue open. But I don't consider this a bug, so I set the type
to
Enhancement instead. Suggestions and, preferably, patches are welcome. :)
Original comment by aggraef@gmail.com
on 11 Jan 2009 at 9:24
Original comment by aggraef@gmail.com
on 11 Jan 2009 at 9:26
I'm closing this issue report now, as no patches were submitted and I don't
have the
time to work on this either.
Original comment by aggraef@gmail.com
on 1 Sep 2009 at 6:15
Original issue reported on code.google.com by
sedill...@gmail.com
on 11 Jan 2009 at 5:46