Consider this snippet from scribble/html/xml
(provide make-element)
(struct element (tag attrs body [cache #:auto #:mutable])
#:constructor-name make-element
#:transparent #:omit-define-syntaxes #:auto-value #f
#:property prop:procedure
(lambda (e)
(unless (element-cache e) (set-element-cache! e (element->output e)))
(element-cache e)))
(provide element)
(define (element tag . args)
(define-values [attrs body] (attributes+body args))
(make-element tag attrs body))
I would like to provide the structure definition, but simply adding (provide
(struct-out element)) does not work, since element is not bound to the
structure id.
An #:extra-id-name option for struct could solve this.
Is there another way to provide the struct element without renaming the
element function?
/Jens Axel
--
--
Jens Axel Søgaard
--
You received this message because you are subscribed to the Google Groups
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-dev/CABefVgwPuF8aDrb%2BjzCkBUd6B2_X64GR0pk6Gw2wfQKdF8Qvcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.