On 5/9/19 12:04 AM, Dmitry Pavlov wrote:
Matthew,
The intended error here is "cannot marshal value that is embedded in
compiled code" at `raco make` time, because fxvectors are not supported
as literals. I'll fix the bytecode writer to check for this case.
OK, thank you. What would you recommend, though, to users who want fxvectors (of
"static" kind) to be generated by macros?
Populating fxvectors in runtime will be a loss of performance, maybe not
critical, but noticeable.
Ah, I see
#lang racket
(require (for-syntax syntax/parse))
(require racket/fixnum)
(define-syntax (macro stx)
(syntax-parse stx
(({~literal macro})
(quasisyntax/loc stx
(begin
(define v-name (fxvector 5))
'OK)))))
(macro)
So I should put fxvector non-literals inside the syntax, and everything will be
fine.
Best regards,
Dmitry
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/14ab0c70-419c-6f27-f88a-97be323ff965%40iaaras.ru.
For more options, visit https://groups.google.com/d/optout.