Fork me on GitHub
#clojure-dev
<
2023-10-11
>
Noah Bogart19:10:55

Is there a way to see the output of LispReader's reading a given form?

hiredman19:10:36

The output is what it returns?

Noah Bogart19:10:25

I guess I mean, can I inspect the Read part of "REPL" before it's passed to eval?

hiredman19:10:23

You want a side channel of reader output

hiredman19:10:02

In that case, no there is nothing built into the reader where you can ask it to send another copy of the output somewhere else

👍 1
hiredman19:10:39

Depending on what you are doing clojure's repl is pretty modular and you could swap in either a custom read or custom eval

hiredman19:10:21

prepl might already do something like that

👍 1
jpmonettas20:10:24

so the repl is just calling (clojure.main/repl-read (Object.) (Object.)) to read from stdin which returns the LispReader output, but I guess will be the same as calling (read-string "(+ 1 2)") , you can run both of those from the repl to look at the LispReader output

👍 1