It seems that if I write a set to a file, it is not in a format where it can be easily read as a set. Here is an example:
#lang racket
(let ([out (open-output-file "test.rkt" #:exists 'replace)])
(write (set 1 2 3 4 5) out)
(close-output-port out))
This makes the file c #<set: 1 3 5 2 4>, which the reader complains about. There is the following unanswered question on the mailing list here .
The way I get around now is to literally write a line "(set "to a file, then all integers with spaces, and then close ")". Super ugly and I would use a reader if possible.
source
share