@@ -159,9 +159,7 @@ stream_bs Utf16LE bs = Stream next 0 l
159159 | i+3 < l && U16.validate2 x1 x2 = Yield (U16.chr2 x1 x2) (i+4)
160160 | otherwise = error $ "bsStream: bad UTF-16LE stream"
161161 where
162− x1 :: Word16
163162 x1 = (shiftL (index (i + 1)) 8) + (index i)
164− x2 :: Word16
165163 x2 = (shiftL (index (i + 3)) 8) + (index (i + 2))
166164 index = fromIntegral . B.unsafeIndex bs :: Int -> Word16
167165stream_bs Utf16BE bs = Stream next 0 l
@@ -174,11 +172,9 @@ stream_bs Utf16BE bs = Stream next 0 l
174172 | i+3 < l && U16.validate2 x1 x2 = Yield (U16.chr2 x1 x2) (i+4)
175173 | otherwise = error $ "bsStream: bad UTF16-BE stream "
176174 where
177− x1 :: Word16
178175 x1 = (shiftL (index i) 8) + (index (i + 1))
179− x2 :: Word16
180176 x2 = (shiftL (index (i + 2)) 8) + (index (i + 3))
181− index = fromIntegral . B.unsafeIndex bs
177+ index = fromIntegral . B.unsafeIndex bs :: Int -> Word16
182178stream_bs Utf32BE bs = Stream next 0 l
183179 where
184180 l = B.length bs