summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwygulmage <keith.wygant@gmail.com>2021-01-08 16:04:31 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-02-05 19:08:50 -0500
commit6085cfb5e508e969ecb69d8dbeb8cfd1fb87ca3d (patch)
treed662da93fcd184d5c648859885e8d354f033442d
parentddbdec4128f0e6760c8c7a19344f2f2a7a3314bf (diff)
downloadhaskell-6085cfb5e508e969ecb69d8dbeb8cfd1fb87ca3d.tar.gz
Remove misleading 'lazy' pattern matches from 'head' and 'tail' in Data.List.NonEmpty
-rw-r--r--libraries/base/Data/List/NonEmpty.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/base/Data/List/NonEmpty.hs b/libraries/base/Data/List/NonEmpty.hs
index 45e8c9a8ea..d66d9c6a92 100644
--- a/libraries/base/Data/List/NonEmpty.hs
+++ b/libraries/base/Data/List/NonEmpty.hs
@@ -156,11 +156,11 @@ unfoldr f a = case f a of
-- | Extract the first element of the stream.
head :: NonEmpty a -> a
-head ~(a :| _) = a
+head (a :| _) = a
-- | Extract the possibly-empty tail of the stream.
tail :: NonEmpty a -> [a]
-tail ~(_ :| as) = as
+tail (_ :| as) = as
-- | Extract the last element of the stream.
last :: NonEmpty a -> a