serializable-struct, etc.: export deserialization info in submodule

This change is slightly incompatible, because `serializable-struct`,
`define-serializable-struct`, and `define-serializable-class` no
longer `provide` and identifier that they used to. Instead, the identifier
is provided by a `deserialize-info` submodule.

The deserializer looks for a `deserialize-info` submodule, and then
falls back to using a module if the submodule is not available.

original commit: 90142edc5b4649e058ccf66970c119076ac5e864
This commit is contained in:
Matthew Flatt 2013-11-08 15:44:26 -07:00
parent a728366aab
commit 30ad2e3890
3 changed files with 13 additions and 9 deletions

View File

@ -5,7 +5,6 @@
make-page-target-element make-redirect-target-element make-link-element
make-index-element
make-target-url target-url struct:target-url target-url? target-url-addr
deserialize-info:target-url-v0
toc-element-toc-content part-title-content paragraph-content
element? element-content element-style)
(for-label scribble/manual-struct

View File

@ -352,7 +352,8 @@
[sizer (-> any)]
[plain (-> any)])))
(provide deserialize-delayed-element)
(module+ deserialize-info
(provide deserialize-delayed-element))
(define deserialize-delayed-element
(make-deserialize-info values values))
@ -396,7 +397,8 @@
[sizer (-> any)]
[plain (-> any)])))
(provide deserialize-part-relative-element)
(module+ deserialize-info
(provide deserialize-part-relative-element))
(define deserialize-part-relative-element
(make-deserialize-info values values))
@ -437,7 +439,8 @@
(provide/contract
(struct delayed-index-desc ([resolve (any/c part? resolve-info? . -> . any)])))
(provide deserialize-delayed-index-desc)
(module+ deserialize-info
(provide deserialize-delayed-index-desc))
(define deserialize-delayed-index-desc
(make-deserialize-info values values))
@ -457,7 +460,8 @@
(or (current-load-relative-directory) (current-directory)))
#:transparent)
(provide deserialize-collect-element)
(module+ deserialize-info
(provide deserialize-collect-element))
(define deserialize-collect-element
(make-deserialize-info values values))
@ -481,7 +485,8 @@
(or (current-load-relative-directory) (current-directory)))
#:transparent)
(provide deserialize-render-element)
(module+ deserialize-info
(provide deserialize-render-element))
(define deserialize-render-element
(make-deserialize-info values values))
@ -513,7 +518,8 @@
(provide (struct-out generated-tag))
(provide deserialize-generated-tag)
(module+ deserialize-info
(provide deserialize-generated-tag))
(define deserialize-generated-tag
(make-deserialize-info values values))

View File

@ -1,7 +1,6 @@
#lang scheme/base
(require (rename-in (except-in "core.rkt"
target-url struct:target-url target-url? target-url-addr
deserialize-info:target-url-v0)
target-url struct:target-url target-url? target-url-addr)
[make-target-url core:make-target-url])
"private/provide-structs.rkt"
"html-properties.rkt"