diff options
author | Bodigrim <andrew.lelechenko@gmail.com> | 2020-05-18 15:47:37 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-01 06:35:36 -0400 |
commit | aab606e4f028d3c418aafc9710003f32f8d8fe12 (patch) | |
tree | 1e107a86f38ba12bec2b86dfceba759b96094079 | |
parent | f945eea569993a4e5ed953f4573e6eab785f309f (diff) | |
download | haskell-aab606e4f028d3c418aafc9710003f32f8d8fe12.tar.gz |
Clarify description of fromListN
-rwxr-xr-x | libraries/base/GHC/Exts.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libraries/base/GHC/Exts.hs b/libraries/base/GHC/Exts.hs index 8f878b813b..f4c7fd3aa6 100755 --- a/libraries/base/GHC/Exts.hs +++ b/libraries/base/GHC/Exts.hs @@ -184,11 +184,12 @@ class IsList l where -- list of @Item l@ fromList :: [Item l] -> l - -- | The 'fromListN' function takes the input list's length as a hint. Its - -- behaviour should be equivalent to 'fromList'. The hint can be used to - -- construct the structure @l@ more efficiently compared to 'fromList'. If - -- the given hint does not equal to the input list's length the behaviour of - -- 'fromListN' is not specified. + -- | The 'fromListN' function takes the input list's length and potentially + -- uses it to construct the structure @l@ more efficiently compared to + -- 'fromList'. If the given number does not equal to the input list's length + -- the behaviour of 'fromListN' is not specified. + -- + -- prop> fromListN (length xs) == fromList xs fromListN :: Int -> [Item l] -> l fromListN _ = fromList |