Closed qaristote closed 1 year ago
I also don't know if using a ByteString builder to concatenate lazy bytestrings is really useful.
https://github.com/tweag/simple-smt/pull/2/commits/703bf75adaaa60477a95d6bc3f39d7b1e2d0a3ba should be doing the job (it handles every properly-formatted s-expression). I wonder if the parsing could be done more efficiently though, as in the end we're just reading a regular expression from a Handle
. Perhaps we could use something like Rtlex ?
I implemented something similar to
hGetContentsSizeHint
in theProcess
backend so as to get rid of theresponse
field inSolver.Backend
.I'm not sure of the implementation though, as there is still the problem of ensuring that the full output gets written before it starts being read. It should be ok if the solver always ends its output with an EOF and
hGet
waits for an EOF. But I'm not sure thathGet
is the right function for this, I used it because I wanted to use something provided by thebytestring
library.