remove read of the heads

and one tail

Removed head from Utility.PartialPrelude in order to avoid the build
warning with recent ghc versions as well.
This commit is contained in:
Joey Hess 2024-09-26 18:43:59 -04:00
parent 10216b44d2
commit 4ca3d1d584
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 32 additions and 42 deletions

View file

@ -9,8 +9,6 @@
module Utility.PartialPrelude (
Utility.PartialPrelude.read,
Utility.PartialPrelude.head,
Utility.PartialPrelude.tail,
Utility.PartialPrelude.init,
Utility.PartialPrelude.last,
Utility.PartialPrelude.readish,
@ -27,16 +25,6 @@ import qualified Data.Maybe
read :: Read a => String -> a
read = Prelude.read
{- head is a partial function; head [] is an error
- Instead, use: take 1 or headMaybe -}
head :: [a] -> a
head = Prelude.head
{- tail is also partial
- Instead, use: drop 1 -}
tail :: [a] -> [a]
tail = Prelude.tail
{- init too
- Instead, use: beginning -}
init :: [a] -> [a]