File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/HaskellWorks/Data/Xml Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ module HaskellWorks.Data.Xml.Conduit
11
11
) where
12
12
13
13
import Data.ByteString as BS
14
- import Data.Vector.Storable ((!) )
15
14
import Data.Word
16
15
import Data.Word8
16
+ import HaskellWorks.Data.AtIndex ((!!!) )
17
17
import HaskellWorks.Data.Bits.BitWise
18
18
import Prelude as P
19
19
@@ -38,7 +38,7 @@ interestingWord8s = DVS.constructN 256 go
38
38
{-# NOINLINE interestingWord8s #-}
39
39
40
40
isInterestingWord8 :: Word8 -> Word8
41
- isInterestingWord8 b = fromIntegral (interestingWord8s ! fromIntegral b)
41
+ isInterestingWord8 b = fromIntegral (interestingWord8s !!! fromIntegral b)
42
42
{-# INLINABLE isInterestingWord8 #-}
43
43
44
44
blankedXmlToInterestBits :: [BS. ByteString ] -> [BS. ByteString ]
@@ -60,7 +60,7 @@ blankedXmlToInterestBits' rs is = case is of
60
60
where gen :: ByteString -> Maybe (Word8 , ByteString )
61
61
gen as = if BS. length as == 0
62
62
then Nothing
63
- else Just ( BS. foldr' (\ b m -> (interestingWord8s ! fromIntegral b) .|. (m .<. 1 )) 0 (BS. take 8 as)
63
+ else Just ( BS. foldr' (\ b m -> isInterestingWord8 b .|. (m .<. 1 )) 0 (BS. take 8 as)
64
64
, BS. drop 8 as
65
65
)
66
66
You can’t perform that action at this time.
0 commit comments