@@ -239,6 +239,9 @@ relinkForks :: UniqueGen -> EnvRefCache -> Forks -> IO Forks
239239relinkForks ug cache = \case
240240 NoFork -> pure NoFork
241241 Forks fid lref0 forks -> do
242+ -- A specific IORef EnvRef can be held by more than one local environment
243+ -- and we need to replace all its occurences with the same, new value
244+ -- containing its clone.
242245 readIORef cache >>= pure . M.lookup fid >>= \case
243246 Just lref -> Forks fid <$> pure lref
244247 <*> relinkForks ug cache forks