diff --git a/src/Data/Array/Mutable/Linear/Internal.hs b/src/Data/Array/Mutable/Linear/Internal.hs index d1b246e0..4f02f861 100644 --- a/src/Data/Array/Mutable/Linear/Internal.hs +++ b/src/Data/Array/Mutable/Linear/Internal.hs @@ -65,8 +65,8 @@ alloc :: HasCallStack => Int -> a -> - (Array a %1 -> Ur b) %1 -> - Ur b + (Array a %1 -> b) %1 -> + b alloc s x f | s < 0 = (error ("Array.alloc: negative size: " ++ show s) :: x %1 -> x) diff --git a/src/Data/Array/Mutable/Unlifted/Linear.hs b/src/Data/Array/Mutable/Unlifted/Linear.hs index c83eb3aa..b10feef1 100644 --- a/src/Data/Array/Mutable/Unlifted/Linear.hs +++ b/src/Data/Array/Mutable/Unlifted/Linear.hs @@ -60,7 +60,7 @@ infixr 0 `lseq` -- same fixity as base.seq -- | Allocate a mutable array of given size using a default value. -- -- The size should be non-negative. -alloc :: Int -> a -> (Array# a %1 -> Ur b) %1 -> Ur b +alloc :: Int -> a -> (Array# a %1 -> b) %1 -> b alloc (GHC.I# s) a f = let new = GHC.runRW# Prelude.$ \st -> case GHC.newArray# s a st of diff --git a/src/Data/HashMap/Mutable/Linear/Internal.hs b/src/Data/HashMap/Mutable/Linear/Internal.hs index ed44d85f..c6c14e2b 100644 --- a/src/Data/HashMap/Mutable/Linear/Internal.hs +++ b/src/Data/HashMap/Mutable/Linear/Internal.hs @@ -135,8 +135,8 @@ empty :: forall k v b. Keyed k => Int -> - (HashMap k v %1 -> Ur b) %1 -> - Ur b + (HashMap k v %1 -> b) %1 -> + b empty size scope = let cap = max 1 size in Array.alloc cap Nothing (\arr -> scope (HashMap 0 cap arr))