From aab606e4f028d3c418aafc9710003f32f8d8fe12 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Mon, 18 May 2020 15:47:37 -0400 Subject: Clarify description of fromListN --- libraries/base/GHC/Exts.hs | 11 ++++++----- 1 file 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 -- cgit v1.2.1