@@ -109,10 +109,10 @@ contains (W8# word#) (Utf8 ba#) =
109109 containsHelp word# ba# 0# (sizeofByteArray# ba#)
110110
111111
112−containsHelp :: Word# -> ByteArray# -> Int# -> Int# -> Bool
112+containsHelp :: Word8# -> ByteArray# -> Int# -> Int# -> Bool
113113containsHelp word# ba# !offset# len# =
114114 if isTrue# (offset# <# len#) then
115− if isTrue# (eqWord# word# (indexWord8Array# ba# offset#))
115+ if isTrue# (eqWord8# word# (indexWord8Array# ba# offset#))
116116 then True
117117 else containsHelp word# ba# (offset# +# 1#) len#
118118 else
@@ -145,7 +145,7 @@ startsWithChar isGood bytes@(Utf8 ba#) =
145145 False
146146 else
147147 let
148− !w# = indexWord8Array# ba# 0#
148+ !w# = word8ToWord# (indexWord8Array# ba# 0#)
149149 !char
150150 | isTrue# (ltWord# w# 0xC0##) = C# (chr# (word2Int# w#))
151151 | isTrue# (ltWord# w# 0xE0##) = chr2 ba# 0# w#
@@ -164,7 +164,7 @@ endsWithWord8 (W8# w#) (Utf8 ba#) =
164164 let len# = sizeofByteArray# ba# in
165165 isTrue# (len# ># 0#)
166166 &&
167− isTrue# (eqWord# w# (indexWord8Array# ba# (len# -# 1#)))
167+ isTrue# (eqWord8# w# (indexWord8Array# ba# (len# -# 1#)))
168168
169169
170170
@@ -186,11 +186,11 @@ splitHelp str start offsets =
186186 unsafeSlice str start offset : splitHelp str (offset + 1) offsets
187187
188188
189−findDividers :: Word# -> ByteArray# -> Int# -> Int# -> [Int] -> [Int]
189+findDividers :: Word8# -> ByteArray# -> Int# -> Int# -> [Int] -> [Int]
190190findDividers divider# ba# !offset# len# revOffsets =
191191 if isTrue# (offset# <# len#) then
192192 findDividers divider# ba# (offset# +# 1#) len# $
193− if isTrue# (eqWord# divider# (indexWord8Array# ba# offset#))
193+ if isTrue# (eqWord8# divider# (indexWord8Array# ba# offset#))
194194 then I# offset# : revOffsets
195195 else revOffsets
196196 else
@@ -353,7 +353,7 @@ toCharsHelp ba# offset# len# =
353353 []
354354 else
355355 let
356− !w# = indexWord8Array# ba# offset#
356+ !w# = word8ToWord# (indexWord8Array# ba# offset#)
357357 !(# char, width# #)
358358 | isTrue# (ltWord# w# 0xC0##) = (# C# (chr# (word2Int# w#)), 1# #)
359359 | isTrue# (ltWord# w# 0xE0##) = (# chr2 ba# offset# w#, 2# #)
@@ -370,7 +370,7 @@ chr2 :: ByteArray# -> Int# -> Word# -> Char
370370chr2 ba# offset# firstWord# =
371371 let
372372 !i1# = word2Int# firstWord#
373− !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
373+ !i2# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 1#)))
374374 !c1# = uncheckedIShiftL# (i1# -# 0xC0#) 6#
375375 !c2# = i2# -# 0x80#
376376 in
@@ -382,8 +382,8 @@ chr3 :: ByteArray# -> Int# -> Word# -> Char
382382chr3 ba# offset# firstWord# =
383383 let
384384 !i1# = word2Int# firstWord#
385− !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
386− !i3# = word2Int# (indexWord8Array# ba# (offset# +# 2#))
385+ !i2# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 1#)))
386+ !i3# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 2#)))
387387 !c1# = uncheckedIShiftL# (i1# -# 0xE0#) 12#
388388 !c2# = uncheckedIShiftL# (i2# -# 0x80#) 6#
389389 !c3# = i3# -# 0x80#
@@ -396,9 +396,9 @@ chr4 :: ByteArray# -> Int# -> Word# -> Char
396396chr4 ba# offset# firstWord# =
397397 let
398398 !i1# = word2Int# firstWord#
399− !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
400− !i3# = word2Int# (indexWord8Array# ba# (offset# +# 2#))
401− !i4# = word2Int# (indexWord8Array# ba# (offset# +# 3#))
399+ !i2# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 1#)))
400+ !i3# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 2#)))
401+ !i4# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 3#)))
402402 !c1# = uncheckedIShiftL# (i1# -# 0xF0#) 18#
403403 !c2# = uncheckedIShiftL# (i2# -# 0x80#) 12#
404404 !c3# = uncheckedIShiftL# (i3# -# 0x80#) 6#
@@ -473,7 +473,7 @@ toEscapedBuilderHelp before after !name@(Utf8 ba#) k =
473473escape :: Word8 -> Word8 -> Ptr a -> Utf8 t -> Int -> Int -> Int -> IO ()
474474escape before@(W8# before#) after ptr name@(Utf8 ba#) offset@(I# offset#) len@(I# len#) i@(I# i#) =
475475 if isTrue# (i# <# len#) then
476− if isTrue# (eqWord# before# (indexWord8Array# ba# (offset# +# i#)))
476+ if isTrue# (eqWord8# before# (indexWord8Array# ba# (offset# +# i#)))
477477 then
478478 do writeWordToPtr ptr i after
479479 escape before after ptr name offset len (i + 1)