-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
Related to #1706
This may be by design. However, if you want to read multiple sexpr from a stream, it may interferes it.
CL-USER> *readtable*
#<NAMED-READTABLE COALTON:COALTON {1200BC08C3}>
CL-USER> (with-input-from-string (s "(a)(b)") (list (read s nil nil) (read s nil nil)))
((A) NIL)
If I'm using Slime and I run :coalton/tests, I'm in this state.
This is because read-coalton-toplevel-open-paren copies the entire input; the input stram is exhausted when the first call of read returns.
(t
;; no metadata, no file operation, therefore we are in a
;; repl: bind a source-string containing cloned input
(let ((*source* (coalton-impl/source:make-source-string
(with-output-to-string (out)
(write-char #\( out)
(alexandria:copy-stream stream out))
:name "repl")))
(with-open-stream (stream (source:source-stream *source*))
(read-char stream)
(maybe-read-coalton stream *source*))))))
- If the Coalton readtable isn't supposed to be used when the program uses
readother than reading Coalton source, this may be a non-issue. We need to figure out why Slime uses Coalton readtable while executing CL code, though. - If the Coalton readtable is supposed to be transparent (e.g. it should function just like normal readtable if auxiliary info isn't there), we may need to do something.
Metadata
Metadata
Assignees
Labels
No labels