drscheme shares pconvert-prop.ss, EOPL uses it to change constructor printing
svn: r545
This commit is contained in:
parent
e08138d97c
commit
3881680c95
|
@ -174,7 +174,8 @@
|
|||
(list 'mzscheme
|
||||
'(lib "foreign.ss")
|
||||
'(lib "mred.ss" "mred")
|
||||
'(lib "cache-image-snip.ss" "mrlib")))
|
||||
'(lib "cache-image-snip.ss" "mrlib")
|
||||
'(lib "pconvert-prop.ss")))
|
||||
|
||||
;; ensure that they are all here.
|
||||
(for-each (λ (x) (dynamic-require x #f)) to-be-copied-module-specs)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
(module datatype mzscheme
|
||||
|
||||
(require (lib "pconvert-prop.ss"))
|
||||
(require-for-syntax "private/utils.ss")
|
||||
|
||||
(define-syntax define-datatype
|
||||
|
@ -100,7 +101,9 @@
|
|||
(let-values ([(struct:variant make-variant variant?
|
||||
variant-accessor variant-mutator)
|
||||
(make-struct-type 'variant-name struct:x variant-field-count 0
|
||||
#f null (make-inspector))]
|
||||
#f
|
||||
`((,prop:print-convert-constructor-name . variant-name))
|
||||
(make-inspector))]
|
||||
...)
|
||||
;; User-available functions:
|
||||
(values
|
||||
|
|
|
@ -34,10 +34,11 @@ Differences from the book:
|
|||
as the variant's `field-id's, and each argument is checked by
|
||||
applying the function produced by the variant's `predicate-expr'.
|
||||
|
||||
When constructor-based printing is used in DrScheme, variant
|
||||
instances are printed with a `make-' prefix before the variant name.
|
||||
Thus, in addition to `variant-id', `make-variant-id' is also defined
|
||||
for each `variant-id' (to the same constructor as `variant-id').
|
||||
In DrScheme v209 and older, when constructor-based printing was
|
||||
used, variant instances were printed with a `make-' prefix before
|
||||
the variant name. Thus, for compatibility, in addition to
|
||||
`variant-id', `make-variant-id' is also defined for each
|
||||
`variant-id' (to the same constructor as `variant-id').
|
||||
|
||||
> (cases datatype-id expr (variant-id (field-id ...) result-expr ...) ...)
|
||||
> (cases datatype-id expr (variant-id (field-id ...) result-expr ...) ... (else result-expr ...))
|
||||
|
|
|
@ -68,7 +68,7 @@ Libraries:
|
|||
to return an alist of bytes, not strings
|
||||
Misc:
|
||||
Cygwin build produces a Unix-style installation instead of
|
||||
a Windows-style installation (e.g., system-type is 'unix)
|
||||
a Windows-style installation (e.g., system-type is 'unix)
|
||||
|
||||
Version 299.100, March 2005
|
||||
>> See MzScheme_300.txt for information on major changes since
|
||||
|
|
Loading…
Reference in New Issue
Block a user