Skip to content

Commit

Permalink
Drop "possibly" from force's haddocks
Browse files Browse the repository at this point in the history
force indeed copies unconditionally. Even in case like:

> force (generate n fun)

In principle GHC could be able to elide copying using rewrite rules related
to clone/New in practice it doesn't. So it's better to remove possibly since
it will only confuse reader.

Fixes #511
  • Loading branch information
Shimuuar committed Oct 30, 2024
1 parent 89d7584 commit 9ce3d27
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vector/src/Data/Vector.hs
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ createT p = G.createT p
-- ------------------------

-- | /O(n)/ Yield the argument, but force it not to retain any extra memory,
-- possibly by copying it.
-- by copying it.
--
-- This is especially useful when dealing with slices. For example:
--
Expand Down
2 changes: 1 addition & 1 deletion vector/src/Data/Vector/Generic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ createT p = runST (p >>= T.mapM unsafeFreeze)
-- ------------------------

-- | /O(n)/ Yield the argument, but force it not to retain any extra memory,
-- possibly by copying it.
-- by copying it.
--
-- This is especially useful when dealing with slices. For example:
--
Expand Down
2 changes: 1 addition & 1 deletion vector/src/Data/Vector/Primitive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ createT p = G.createT p
-- ------------------------

-- | /O(n)/ Yield the argument, but force it not to retain any extra memory,
-- possibly by copying it.
-- by copying it.
--
-- This is especially useful when dealing with slices. For example:
--
Expand Down
2 changes: 1 addition & 1 deletion vector/src/Data/Vector/Storable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ createT p = G.createT p
-- ------------------------

-- | /O(n)/ Yield the argument, but force it not to retain any extra memory,
-- possibly by copying it.
-- by copying it.
--
-- This is especially useful when dealing with slices. For example:
--
Expand Down
2 changes: 1 addition & 1 deletion vector/src/Data/Vector/Strict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ createT p = G.createT p
-- ------------------------

-- | /O(n)/ Yield the argument, but force it not to retain any extra memory,
-- possibly by copying it.
-- by copying it.
--
-- This is especially useful when dealing with slices. For example:
--
Expand Down
2 changes: 1 addition & 1 deletion vector/src/Data/Vector/Unboxed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ createT p = G.createT p
-- ------------------------

-- | /O(n)/ Yield the argument, but force it not to retain any extra memory,
-- possibly by copying it.
-- by copying it.
--
-- This is especially useful when dealing with slices. For example:
--
Expand Down

0 comments on commit 9ce3d27

Please sign in to comment.