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