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
1111 ) where
1212
1313import Data.ByteString as BS
14- import Data.Vector.Storable ((!) )
1514import Data.Word
1615import Data.Word8
16+ import HaskellWorks.Data.AtIndex ((!!!) )
1717import HaskellWorks.Data.Bits.BitWise
1818import Prelude as P
1919
@@ -38,7 +38,7 @@ interestingWord8s = DVS.constructN 256 go
3838{-# NOINLINE interestingWord8s #-}
3939
4040isInterestingWord8 :: Word8 -> Word8
41- isInterestingWord8 b = fromIntegral (interestingWord8s ! fromIntegral b)
41+ isInterestingWord8 b = fromIntegral (interestingWord8s !!! fromIntegral b)
4242{-# INLINABLE isInterestingWord8 #-}
4343
4444blankedXmlToInterestBits :: [BS. ByteString ] -> [BS. ByteString ]
@@ -60,7 +60,7 @@ blankedXmlToInterestBits' rs is = case is of
6060 where gen :: ByteString -> Maybe (Word8 , ByteString )
6161 gen as = if BS. length as == 0
6262 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)
6464 , BS. drop 8 as
6565 )
6666
You can’t perform that action at this time.
0 commit comments