So I’m writing an STklos port of SRFI 279. I mostly copied the existing (Chibi) impelementation where it uses SRFI 253 define-checked to define most procedures. And returns a quasiquote-constructed lists. However, such style results in a file that’s basically unparseable for STklos, emitting a bunch of errors, one per such define-checked:
compiler-error: invalid context within quasiquote. Call was (define-checked (vector-properties (object vector?)) `((vector-length ,(vector-length object)) ,@(map (lambda (Si Se) (list Si Se)) (iota (vector-length object)) (vector->list object))))
I was able to isolate it to the use of unquote-splicing / ,@ and hyg:untag-quasiquote in mbe.stk where the error text appears. However, I cannot understand the purpose of this procedure—why strip off quasiquotes if these are valid procedure bodies?
Example code to test on:
;; Depends on SRFI 253, but can be replaced with any macro?
(define-checked (vector-properties (object vector?))
`((vector-length ,(vector-length object))
,@(map (lambda (i e) (list i e))
;; Depends on SRFI 1
(iota (vector-length object))
(vector->list object))))
@egallesio?
So I’m writing an STklos port of SRFI 279. I mostly copied the existing (Chibi) impelementation where it uses SRFI 253
define-checkedto define most procedures. And returns aquasiquote-constructed lists. However, such style results in a file that’s basically unparseable for STklos, emitting a bunch of errors, one per suchdefine-checked:I was able to isolate it to the use of
unquote-splicing/,@andhyg:untag-quasiquotein mbe.stk where the error text appears. However, I cannot understand the purpose of this procedure—why strip off quasiquotes if these are valid procedure bodies?Example code to test on:
@egallesio?