> Since cs:open? executes when the line (let is-open-b = (cs:open? stream)) executes, is-open-b is calculated before the stream is closed, even though it looks like the stream was already closed on the previous line.
This seems like a bug in our implementation of do to me, though the Haskellers might disagree. It seems to me that
(do
some-monad
(let foo = some-pure-computation)
another-monad)
This seems like a bug in our implementation of
do
to me, though the Haskellers might disagree. It seems to me thatshould expand to something like
whereas at present it expands into
which eagerly evaluates the
bind
form (imo incorrectly).Originally posted by @gefjon in https://github.com/coalton-lang/coalton/issues/765#issuecomment-1279755530