summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorHécate <hecate+gitlab@glitchbra.in>2021-01-12 21:00:48 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-02-22 18:26:55 -0500
commitece202297454862717cef8c06d445f8405845b28 (patch)
treecdcd16d19eae96ad5db0c9828430b8ee0341d58a /libraries
parent22ef7ab10097f92a71369ea99f2f24deea6be080 (diff)
downloadhaskell-ece202297454862717cef8c06d445f8405845b28.tar.gz
Add the docspec:base rule to Hadrian
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/Data/List/NonEmpty.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/libraries/base/Data/List/NonEmpty.hs b/libraries/base/Data/List/NonEmpty.hs
index d66d9c6a92..84e909a25a 100644
--- a/libraries/base/Data/List/NonEmpty.hs
+++ b/libraries/base/Data/List/NonEmpty.hs
@@ -113,6 +113,9 @@ import GHC.Base (NonEmpty(..))
infixr 5 <|
+-- $setup
+-- >>> import Prelude (negate)
+
-- | Number of elements in 'NonEmpty' list.
length :: NonEmpty a -> Int
length (_ :| xs) = 1 + Prelude.length xs