freenode/#sicl - IRC Chatlog
Search
12:51:49
beach
Bike: Am I right in thinking that your implementation of COMPILE-TIME would make a query return a global function shadowed by a local function with the same name?
15:04:30
Bike
So that if function info gets up there it returns nil without consulting the global environment, and whatnot
15:06:41
scymtym
Bike: since you are working on compiler errors and macroexpansion: have you considered something like https://github.com/sbcl/sbcl/blob/master/src/code/early-extensions.lisp#L401 ? in SBCL, using this in standard macros allowed improving source locations of errors signaled from macro functions as shown in https://techfak.de/~jmoringe/macroexpansion-condition-locations.png (left side is after, right is before)
15:17:20
Bike
I don't think i understand what this is. I know sbcl tracks macroexpansion chains, is that this?
15:21:05
scymtym
not quite. this allows you to say (defmacro let (bindings &body body) (dolist (b bindings) (with-current-source-form b (unless (typep b '(cons symbol (cons t null))) (error "malformed binding"))))) and the signaled compiler error will have the sub-expression associated to it
15:25:11
Bike
Not sure how to do it. I suppose you'd have the error have the particular form, and then the handler could reconstruct it from the macro form... might not even need sicl support
15:25:51
Bike
I've been thinking cst to ast conditions should just have the cst, rather than splitting it into form and source location like now
15:38:45
Bike
Actually sicl errors can just indicate the cst directly in the error, and not bother with reconstructing crap
15:44:35
scymtym
yes, the mechanism is for macros. clients outside of the implementation can use it as well: https://github.com/scymtym/esrap/blob/master/src/macros.lisp#L207
15:54:00
beach
The current test suite for Cleavir version 2 passes with cleavir-env replaced by Trucler. YAY!
15:59:26
beach
The test suite is not nearly complete, of course, but it's a step in the right direction.