From 73fd305807eb58133f8a26d5731023f014bceed5 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Thu, 26 Oct 2023 18:42:19 +0200 Subject: [PATCH] Stop using deprecated functions --- effectful-core/src/Effectful/Internal/Env.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/effectful-core/src/Effectful/Internal/Env.hs b/effectful-core/src/Effectful/Internal/Env.hs index 4841ff7..999ee0b 100644 --- a/effectful-core/src/Effectful/Internal/Env.hs +++ b/effectful-core/src/Effectful/Internal/Env.hs @@ -133,9 +133,9 @@ emptyEnv = Env 0 cloneEnv :: Env es -> IO (Env es) cloneEnv (Env offset refs storage0) = do Storage storageSize version vs0 es0 fs0 <- readIORef' storage0 - let vsSize = sizeofMutablePrimArray vs0 - esSize = sizeofSmallMutableArray es0 - fsSize = sizeofSmallMutableArray fs0 + vsSize <- getSizeofMutablePrimArray vs0 + esSize <- getSizeofSmallMutableArray es0 + fsSize <- getSizeofSmallMutableArray fs0 when (vsSize /= esSize) $ do error $ "vsSize (" ++ show vsSize ++ ") /= esSize (" ++ show esSize ++ ")" when (esSize /= fsSize) $ do @@ -377,7 +377,7 @@ insertEffect -> IO (Int, Int) insertEffect storage e f = do Storage size version vs0 es0 fs0 <- readIORef' storage - let len0 = sizeofSmallMutableArray es0 + len0 <- getSizeofSmallMutableArray es0 case size `compare` len0 of GT -> error $ "size (" ++ show size ++ ") > len0 (" ++ show len0 ++ ")" LT -> do