1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2025-03-20 04:46:22 +09:00

Remove some old code and adapt to hit-graph

This commit is contained in:
fr33domlover 2016-04-09 15:45:00 +00:00
parent 135e8e7502
commit b68428d9b6
7 changed files with 28 additions and 292 deletions
src/Data/ByteString

View file

@ -36,5 +36,5 @@ import qualified Data.ByteString as B
fromDecimal :: Num a => ByteString -> Maybe a
fromDecimal s =
if (not . B.null) s && B.all (\ b -> 48 <= b && b <= 57) s
then Just $ B.foldl' (\ n b -> 10 * n + b - 48) 0 s
then Just $ B.foldl' (\ n b -> 10 * n + fromIntegral b - 48) 0 s
else Nothing