added racket/struct with make-constructor-style-printer
This commit is contained in:
parent
0f6e2f8029
commit
aee93fb200
8
racket/collects/racket/struct.rkt
Normal file
8
racket/collects/racket/struct.rkt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#lang racket/base
|
||||||
|
(require "private/custom-write.rkt"
|
||||||
|
racket/contract/base)
|
||||||
|
(provide (contract-out
|
||||||
|
[make-constructor-style-printer
|
||||||
|
(-> (-> any/c (or/c symbol? string?))
|
||||||
|
(-> any/c sequence?)
|
||||||
|
(-> any/c output-port? (or/c #t #f 0 1) void?))]))
|
|
@ -1,13 +1,11 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require racket/pretty
|
(require racket/struct
|
||||||
|
racket/pretty
|
||||||
racket/match
|
racket/match
|
||||||
racket/sequence
|
racket/sequence
|
||||||
racket/contract/base)
|
racket/contract/base)
|
||||||
(provide (contract-out
|
(provide make-constructor-style-printer
|
||||||
[make-constructor-style-printer
|
(contract-out
|
||||||
(-> (-> any/c (or/c symbol? string?))
|
|
||||||
(-> any/c sequence?)
|
|
||||||
(-> any/c output-port? (or/c #t #f 0 1) void?))]
|
|
||||||
[prop:auto-custom-write
|
[prop:auto-custom-write
|
||||||
(struct-type-property/c 'constructor)]))
|
(struct-type-property/c 'constructor)]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user