mirror of
https://code.sup39.dev/repos/Wqawg
synced 2025-03-20 04:46:22 +09:00
Upgrade to GHC 8 and LTS 10.10
This commit is contained in:
parent
47b0cdfc2f
commit
8eca3fa647
15 changed files with 101 additions and 162 deletions
src/Data/ByteString
|
@ -1,6 +1,6 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2016 by fr33domlover <fr33domlover@riseup.net>.
|
||||
- Written in 2016, 2018 by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
|
@ -17,7 +17,6 @@
|
|||
|
||||
module Data.ByteString.Local
|
||||
( fromDecimal
|
||||
, stripPrefix
|
||||
)
|
||||
where
|
||||
|
||||
|
@ -41,11 +40,3 @@ fromDecimal s =
|
|||
if (not . B.null) s && B.all (\ b -> 48 <= b && b <= 57) s
|
||||
then Just $ B.foldl' (\ n b -> 10 * n + fromIntegral b - 48) 0 s
|
||||
else Nothing
|
||||
|
||||
#if !(MIN_VERSION_bytestring(0,10,8))
|
||||
stripPrefix :: ByteString -> ByteString -> Maybe ByteString
|
||||
stripPrefix p b =
|
||||
if p `B.isPrefixOf` b
|
||||
then Just $ B.drop (B.length p) b
|
||||
else Nothing
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue