Avoid corrupting the value being printed in Pretty.dethunk
This commit is contained in:
parent
833851392d
commit
0e3ecd5ac3
|
@ -317,6 +317,8 @@ dethunk = \case
|
|||
then pure $ Free $ NVStrF "<thunk>" mempty
|
||||
else do
|
||||
eres <- readVar ref
|
||||
case eres of
|
||||
res <- case eres of
|
||||
Computed v -> removeEffectsM (_baseValue v)
|
||||
_ -> pure $ Free $ NVStrF "<thunk>" mempty
|
||||
_ <- atomicModifyVar active (False,)
|
||||
return res
|
||||
|
|
Loading…
Reference in a new issue