Skip to content

Commit 2830f16

Browse files
committed
Avoid Data.List.{head,tail}
1 parent 4b7770a commit 2830f16

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

containers/src/Data/IntMap/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3504,7 +3504,7 @@ showsBars :: [String] -> ShowS
35043504
showsBars bars
35053505
= case bars of
35063506
[] -> id
3507-
_ -> showString (concat (reverse (tail bars))) . showString node
3507+
_ : tl -> showString (concat (reverse tl)) . showString node
35083508

35093509
node :: String
35103510
node = "+--"

containers/src/Data/IntSet/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ showWide wide bars
12991299

13001300
showsBars :: [String] -> ShowS
13011301
showsBars [] = id
1302-
showsBars bars = showString (concat (reverse (tail bars))) . showString node
1302+
showsBars (_ : tl) = showString (concat (reverse tl)) . showString node
13031303

13041304
showsBitMap :: Word -> ShowS
13051305
showsBitMap = showString . showBitMap

containers/src/Data/Map/Internal/Debug.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ showsBars :: [String] -> ShowS
9191
showsBars bars
9292
= case bars of
9393
[] -> id
94-
_ -> showString (concat (reverse (tail bars))) . showString node
94+
_ : tl -> showString (concat (reverse tl)) . showString node
9595

9696
node :: String
9797
node = "+--"

containers/src/Data/Set/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ showsBars :: [String] -> ShowS
19771977
showsBars bars
19781978
= case bars of
19791979
[] -> id
1980-
_ -> showString (concat (reverse (tail bars))) . showString node
1980+
_ : tl -> showString (concat (reverse tl)) . showString node
19811981

19821982
node :: String
19831983
node = "+--"

0 commit comments

Comments
 (0)