Browse Source

Add missing *->preserve coercions during unparsing

main
Tony Garnock-Jones 2 months ago
parent
commit
f12343e723
  1. 8
      implementations/racket/preserves/preserves-schema/unparser.rkt

8
implementations/racket/preserves/preserves-schema/unparser.rkt

@ -13,10 +13,10 @@
(define (pattern->unparser pattern src-stx)
(match (unwrap pattern)
[(NamedSimplePattern_ n p) (pattern->unparser p (escape n))]
[(SimplePattern-any) src-stx]
[(SimplePattern-atom (AtomKind-Float)) `(->float ,src-stx)]
[(SimplePattern-atom (AtomKind-Double)) `(exact->inexact ,src-stx)]
[(SimplePattern-atom _) src-stx]
[(SimplePattern-any) `(*->preserve ,src-stx)]
[(SimplePattern-atom (AtomKind-Float)) `(->float (*->preserve ,src-stx))]
[(SimplePattern-atom (AtomKind-Double)) `(exact->inexact (*->preserve ,src-stx))]
[(SimplePattern-atom _) `(*->preserve ,src-stx)]
[(SimplePattern-embedded _interface) `(embedded ,src-stx)]
[(SimplePattern-lit v) `',v]
[(SimplePattern-seqof variable-pat)

Loading…
Cancel
Save