on master help sign in
Clarify note for unsafeConsEnv
commit04f427d5ffba587e143529b45aa125b39ebdcbd6 authorAndrzej Rybczak <andrzej@rybczak.net> dateMon 26 Jul 2021, 15:58 (5 years ago) parentc851bda
1 file changed+2−1
effectful-core/src/Effectful/Internal/Env.hs+2−1
effectful-core/src/Effectful/Internal/Env.hs+2−1
@@ -341,7 +341,8 @@ checkSizeEnv k (Env (Forks _ baseIx lref _) _ _) = do
341341-- | Extend the environment with a new data type (in place).
342342--
343343-- /Note:/ this function is __unsafe__ because it renders the input 'Env'
344−-- unusable, but it's not checked anywhere.
344+-- unusable until the corresponding 'unsafeTailEnv' call, but it's not checked
345+-- anywhere.
345346unsafeConsEnv :: handler e -> Relinker handler e -> Env es -> IO (Env (e : es))
346347unsafeConsEnv e f (Env fork gref gen) = case fork of
347348 NoFork -> do