Skip to content

Instantly share code, notes, and snippets.

@kindaro
Created February 15, 2024 15:07
Show Gist options
  • Save kindaro/5e512f45e52dc03be7850341c20b50b3 to your computer and use it in GitHub Desktop.
Save kindaro/5e512f45e52dc03be7850341c20b50b3 to your computer and use it in GitHub Desktop.
inits_inits' [Occ=LoopBreaker] :: Text -> [Text]
[GblId, Arity=1, Str=<1L>, Unf=OtherCon []]
inits_inits'
= \ (ds :: Text) ->
case ds of {
Empty -> [] @Text;
Chunk bx bx1 bx2 ts ->
let {
z :: [Text]
[LclId]
z = map
@Text
@Text
(\ (ds1 :: Text) -> Chunk bx bx1 bx2 ds1)
(inits_inits' ts) } in
letrec {
go10 [Occ=LoopBreaker, Dmd=SCS(L)] :: [Text] -> [Text]
[LclId, Arity=1, Str=<1L>, Unf=OtherCon []]
go10
= \ (ds1 :: [Text]) ->
case ds1 of {
[] -> z;
: y ys ->
: @Text
(case y of { Text unbx unbx1 unbx2 ->
Chunk unbx unbx1 unbx2 Empty
})
(go10 ys)
}; } in
go10
($s$wunsafeDrop
empty
(letrec {
$wloop2 [InlPrag=[2], Occ=LoopBreaker, Dmd=SCS(L)]
:: Int# -> [Text]
[LclId, Arity=1, Str=<L>, Unf=OtherCon []]
$wloop2
= \ (ww :: Int#) ->
case >=# ww bx2 of {
__DEFAULT ->
case indexWord8Array# bx (+# bx1 ww) of r# { __DEFAULT ->
let {
c# :: Int#
[LclId]
c# = word2Int# (clz8# (and# (not# (word8ToWord# r#)) 255##)) } in
let {
j :: Int#
[LclId]
j = +# ww (xorI# c# (<=# c# 0#)) } in
: @Text (Text bx bx1 j) ($wloop2 j)
};
1# -> [] @Text
}; } in
$wloop2 0#)
1#)
}
end Rec }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment