Chez Scheme: fix make-date and date-nanosecond signature

This commit is contained in:
Matthew Flatt 2021-03-16 08:26:06 -06:00
parent a5db4bf376
commit 5058dc5a1a
2 changed files with 7 additions and 3 deletions

View File

@ -506,6 +506,10 @@
(and (date? $date-d5) (not (time? $date-d5))))
(date? (make-date 0 0 0 0 1 1 1970 -24))
(date? (make-date 999999999 59 59 23 31 12 2007 24))
(begin
(define $date-d8 (make-date 999999999 59 59 23 31 12 2007 24))
#t)
(not (fixnum? (date-nanosecond $date-d8)))
(eqv? (date-nanosecond $date-d1) 1)
(eqv? (date-second $date-d1) 2)
(eqv? (date-minute $date-d1) 3)

View File

@ -860,7 +860,7 @@
(date-hour [sig [(date) -> (fixnum)]] [flags pure mifoldable discard true])
(date-minute [sig [(date) -> (fixnum)]] [flags pure mifoldable discard true])
(date-month [sig [(date) -> (fixnum)]] [flags pure mifoldable discard true])
(date-nanosecond [sig [(date) -> (fixnum)]] [flags pure mifoldable discard true])
(date-nanosecond [sig [(date) -> (uint)]] [flags pure mifoldable discard true])
(date-second [sig [(date) -> (fixnum)]] [flags pure mifoldable discard true])
(date-week-day [sig [(date) -> (fixnum)]] [flags pure mifoldable discard true])
(date-year-day [sig [(date) -> (fixnum)]] [flags pure mifoldable discard true])
@ -869,8 +869,8 @@
(date-zone-offset [sig [(date) -> (fixnum)]] [flags pure mifoldable discard true])
(date-zone-name [sig [(date) -> (ptr)]] [flags pure mifoldable discard])
(date->time-utc [sig [(date) -> (time-utc)]] [flags alloc])
(make-date [sig [(sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum) -> (date)]
[(sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-fixnum) -> (date)]]
(make-date [sig [(sub-uint sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum) -> (date)]
[(sub-uint sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-ufixnum sub-fixnum) -> (date)]]
[flags alloc])
(make-time [sig [(sub-symbol sub-uint exact-integer) -> (time)]] [flags alloc])
(set-time-nanosecond! [sig [(time sub-uint) -> (void)]] [flags true])