Fix annotation encoding

This commit is contained in:
Tony Garnock-Jones 2019-08-20 22:34:29 +01:00
parent 6783daa20d
commit 79af429b58
1 changed files with 4 additions and 3 deletions

View File

@ -149,9 +149,10 @@
[(? single-flonum?) (bit-string #b00000010 (v :: float bits 32))]
[(? double-flonum?) (bit-string #b00000011 (v :: float bits 64))]
[(annotated annotations _ item)
(apply bit-string-append
(map (lambda (a) (bit-string #b00000101 ((encode-value a) :: binary))) annotations)
(encode-value item))]
(bit-string ((apply bit-string-append
(map (lambda (a) (bit-string #b00000101 ((encode-value a) :: binary)))
annotations)) :: binary)
((encode-value item) :: binary))]
[(stream-of 'string p) (encode-stream 1 1 bytes? p)]
[(stream-of 'byte-string p) (encode-stream 1 2 bytes? p)]
[(stream-of 'symbol p) (encode-stream 1 3 bytes? p)]