Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: serializable periods #47

Open
LiberalArtist opened this issue Jan 29, 2021 · 0 comments
Open

Feature request: serializable periods #47

LiberalArtist opened this issue Jan 29, 2021 · 0 comments

Comments

@LiberalArtist
Copy link

Most of gregor's values work with racket/serialize, but periods currently do not:

$ racket
Welcome to Racket v7.9 [cs].
> (require gregor/period racket/serialize)
> (serialize (hours 1))
; serialize: contract violation
;   expected: serializable?
;   given: #<period of 1 hour>

Hopefully adding support would be as simple as using serializable-struct at

(struct Period (years months weeks days hours minutes seconds milliseconds microseconds nanoseconds dp? tp?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant