oops, no match available here

This commit is contained in:
John Clements 2011-05-26 17:46:05 -07:00
parent 53cfbd27c1
commit 10cb0e61e2

View File

@ -3,9 +3,9 @@
racket/serialize)
(define (read/string str)
(match (read (open-input-string str))
[(? eof-object? e) (raise-type-error 'read/string "nonempty string" str)]
[other other]))
(define r (read (open-input-string str)))
(cond [(eof-object? r) (raise-type-error 'read/string "nonempty string" str)]
[else r]))
;; Eli: Same comments as `read/bytes'.