From 79af429b58cb2f41a59e92eba35709576fc56d07 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 20 Aug 2019 22:34:29 +0100 Subject: [PATCH] Fix annotation encoding --- implementations/racket/preserves/main.rkt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/implementations/racket/preserves/main.rkt b/implementations/racket/preserves/main.rkt index 76c7e39..b3fcaa5 100644 --- a/implementations/racket/preserves/main.rkt +++ b/implementations/racket/preserves/main.rkt @@ -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)]