Result size of Tidy Core = {terms: 1,17, types: 942, coercions: 328} $WBuffer $WBuffer = \ @ m @ a tpl tpl -> let { __DEFAULT ~ tpl <- tpl } in let { __DEFAULT ~ tpl <- tpl } in Buffer tpl tpl lvl lvl = unpackCString# "Negative exponent" $s^1 $s^1 = error lvl lvl1 lvl1 = __integer 1 lvl2 lvl2 = __integer 2 Rec { $wg1 $wg1 = \ ww w ww1 -> case eqInteger (remInteger w even2) even1 of _ { False -> case eqInteger w lvl1 of _ { False -> $wg1 (*# ww ww) (quotInteger (minusInteger w lvl1) lvl2) (*# ww ww1); True -> *# ww ww1 }; True -> $wg1 (*# ww ww) (quotInteger w lvl2) ww1 } end Rec } Rec { $wf $wf = \ ww w -> case eqInteger (remInteger w even2) even1 of _ { False -> case eqInteger w lvl1 of _ { False -> $wg1 (*# ww ww) (quotInteger (minusInteger w lvl1) lvl2) ww; True -> ww }; True -> $wf (*# ww ww) (quotInteger w lvl2) } end Rec } $s^2 $s^2 = __integer 0 $w$s^ $w$s^ = \ w w1 -> case ltInteger w1 $s^2 of _ { False -> case eqInteger w1 $s^2 of _ { False -> let { I# ww ~ _ <- w } in $wf ww w1; True -> 1 }; True -> case $s^1 of wild1 { } } $s^ $s^ = \ w w1 -> let { __DEFAULT ~ ww <- $w$s^ w w1 } in I# ww file file = unpackCString# ".\\Data\\Vector\\Generic\\Mutable.hs" lvl3 lvl3 = I# 596 lvl4 lvl4 = unpackCString# "write" main12 main12 = \ rb1 ww -> checkError file lvl3 Bounds lvl4 (checkIndex_msg# ww rb1) main11 main11 = \ rb1 ww -> checkError file lvl3 Bounds lvl4 (checkIndex_msg# ww rb1) lvl5 lvl5 = I# 531 lvl6 lvl6 = unpackCString# "grow" main10 main10 = \ x1 -> checkError file lvl5 Bounds lvl6 (checkLength_msg# x1) $wa1 $wa1 = \ ww ww1 w w1 -> let { MVector rb rb1 rb2 ~ _ <- ww1 `cast` ... } in let { a a = +# ww 1 } in let { lvl7 lvl7 = I# a } in let { lvl8 lvl8 = >=# ww 0 } in let { $s$wa $s$wa = \ sc sc1 sc2 sg sc3 -> case lvl8 of _ { False -> case main12 sc1 ww of wild1 { }; True -> case <# ww sc1 of _ { False -> case main11 sc1 ww of wild1 { }; True -> (# let { I# x# ~ _ <- w } in (writeIntArray# sc2 (+# sc ww) x# (sc3 `cast` ...)) `cast` ..., Buffer lvl7 ((MVector sc sc1 sc2) `cast` ...) #) } } } in case ># rb1 ww of _ { False -> let { x1 x1 = *# ww 3 } in case >=# x1 0 of _ { False -> case main10 x1 of wild3 { }; True -> let { x x = +# rb1 x1 } in let { (# ipv, ipv1 #) ~ _ <- newByteArray# (*# x 4) (w1 `cast` ...) } in let { __DEFAULT ~ ipv2 <- (copyMutableByteArray# rb2 (*# rb 4) ipv1 0 (*# rb1 4) ipv) `cast` ... } in $s$wa 0 x ipv1 @~ (Sym <(NTCo:R:MVectorsInt )> ; Sym <(TFCo:R:MVectorsInt )>) ipv2 }; True -> $s$wa rb rb1 rb2 @~ (Sym <(NTCo:R:MVectorsInt )> ; Sym <(TFCo:R:MVectorsInt )>) w1 } main9 main9 = \ w w1 w2 -> let { Buffer ww ww1 ~ _ <- w } in let { I# ww3 ~ _ <- ww } in $wa1 ww3 ww1 w1 w2 buf buf = \ @ m @ a ds1 -> let { Buffer ds2 ds3 ~ _ <- ds1 } in ds3 len len = \ @ m @ a ds1 -> let { Buffer ds2 ds3 ~ _ <- ds1 } in ds2 main4 main4 = I# 2 main3 main3 = __integer 24 ds ds = let { __DEFAULT ~ ww <- $w$s^ main4 main3 } in I# ww $wa $wa = \ w w1 ww ww1 w2 -> let { __DEFAULT ~ _ <- w } in case ># ww1 0 of _ { False -> (# w2, w1 #); True -> let { I# x ~ wild <- ww } in let { I# y ~ _ <- ds } in case <=# x y of _ { False -> (# w2, w1 #); True -> let { Buffer c b ~ _ <- w1 `cast` ... } in let { MVector rb rb1 rb2 ~ wild5 <- b `cast` ... } in let { I# x1 ~ _ <- c } in let { (# ipv, ipv1 #) ~ _ <- unsafeFreezeByteArray# rb2 (w2 `cast` ...) } in let { $w$j $w$j = \ w3 -> let { $j $j = \ tpl3 -> letrec { $s$wand_loop $s$wand_loop = \ sc -> case >=# sc tpl3 of _ { False -> let { __DEFAULT ~ wild8 <- indexIntArray# ipv1 (+# rb sc) } in case <=# (*# wild8 wild8) x of _ { False -> True; True -> case wild8 of wild10 { __DEFAULT -> case remInt# x wild10 of _ { __DEFAULT -> $s$wand_loop (+# sc 1); 0 -> False }; (-1) -> False; 0 -> case divZeroError of wild11 { } } }; True -> True }; } in case $s$wand_loop 0 of _ { False -> letrec { $s$wa $s$wa = \ sc sc1 sc2 sc3 sg sc4 -> case ># sc 0 of _ { False -> (# sc1, (Buffer (I# sc2) sc3) `cast` ... #); True -> case <=# sc4 y of _ { False -> (# sc1, (Buffer (I# sc2) sc3) `cast` ... #); True -> let { MVector rb3 rb4 rb5 ~ wild10 <- sc3 `cast` ... } in let { (# ipv2, ipv3 #) ~ _ <- unsafeFreezeByteArray# rb5 (sc1 `cast` ...) } in let { $w$j1 $w$j1 = \ w4 -> let { $j1 $j1 = \ tpl1 -> letrec { $s$wand_loop1 $s$wand_loop1 = \ sc5 -> case >=# sc5 tpl1 of _ { False -> let { __DEFAULT ~ wild12 <- indexIntArray# ipv3 (+# rb3 sc5) } in case <=# (*# wild12 wild12) sc4 of _ { False -> True; True -> case wild12 of wild14 { __DEFAULT -> case remInt# sc4 wild14 of _ { __DEFAULT -> $s$wand_loop1 (+# sc5 1); 0 -> False }; (-1) -> False; 0 -> case divZeroError of wild15 { } } }; True -> True }; } in case $s$wand_loop1 0 of _ { False -> $s$wa (-# sc 1) (ipv2 `cast` ...) sc2 (wild10 `cast` ...) @~ (Buffer <(TFCo:R:PrimStateIO)> ) (+# sc4 2); True -> let { (# ipv4, ipv5 #) ~ _ <- ($wa1 sc2 (wild10 `cast` ...) (I# sc4) (ipv2 `cast` ...)) `cast` ... } in $s$wa1 ipv5 (+# sc4 2) (-# sc 1) ipv4 } } in case <=# w4 rb4 of _ { False -> $j1 rb4; True -> $j1 w4 } } in case <=# sc2 0 of _ { False -> $w$j1 sc2; True -> $w$j1 0 } } }; $s$wa1 $s$wa1 = \ sc sc1 sc2 sc3 -> case ># sc2 0 of _ { False -> (# sc3, sc #); True -> case <=# sc1 y of _ { False -> (# sc3, sc #); True -> let { Buffer c1 b1 ~ _ <- sc `cast` ... } in let { MVector rb3 rb4 rb5 ~ wild11 <- b1 `cast` ... } in let { I# x2 ~ _ <- c1 } in let { (# ipv2, ipv3 #) ~ _ <- unsafeFreezeByteArray# rb5 (sc3 `cast` ...) } in let { $w$j1 $w$j1 = \ w4 -> let { $j1 $j1 = \ tpl1 -> letrec { $s$wand_loop1 $s$wand_loop1 = \ sc4 -> case >=# sc4 tpl1 of _ { False -> let { __DEFAULT ~ wild14 <- indexIntArray# ipv3 (+# rb3 sc4) } in case <=# (*# wild14 wild14) sc1 of _ { False -> True; True -> case wild14 of wild16 { __DEFAULT -> case remInt# sc1 wild16 of _ { __DEFAULT -> $s$wand_loop1 (+# sc4 1); 0 -> False }; (-1) -> False; 0 -> case divZeroError of wild17 { } } }; True -> True }; } in case $s$wand_loop1 0 of _ { False -> $s$wa (-# sc2 1) (ipv2 `cast` ...) x2 (wild11 `cast` ...) @~ (Buffer <(TFCo:R:PrimStateIO)> ) (+# sc1 2); True -> let { (# ipv4, ipv5 #) ~ _ <- ($wa1 x2 (wild11 `cast` ...) (I# sc1) (ipv2 `cast` ...)) `cast` ... } in $s$wa1 ipv5 (+# sc1 2) (-# sc2 1) ipv4 } } in case <=# w4 rb4 of _ { False -> $j1 rb4; True -> $j1 w4 } } in case <=# x2 0 of _ { False -> $w$j1 x2; True -> $w$j1 0 } } }; } in $s$wa (-# ww1 1) (ipv `cast` ...) x1 (wild5 `cast` ...) @~ (Buffer <(TFCo:R:PrimStateIO)> ) (+# x 2); True -> let { (# ipv2, ipv3 #) ~ _ <- ($wa1 x1 (wild5 `cast` ...) wild (ipv `cast` ...)) `cast` ... } in letrec { $s$wa $s$wa = \ sc sc1 sc2 sc3 -> case ># sc1 0 of _ { False -> (# sc2, sc #); True -> case <=# sc3 y of _ { False -> (# sc2, sc #); True -> let { Buffer c1 b1 ~ _ <- sc `cast` ... } in let { MVector rb3 rb4 rb5 ~ wild11 <- b1 `cast` ... } in let { I# x2 ~ _ <- c1 } in let { (# ipv4, ipv5 #) ~ _ <- unsafeFreezeByteArray# rb5 (sc2 `cast` ...) } in let { $w$j1 $w$j1 = \ w4 -> let { $j1 $j1 = \ tpl1 -> letrec { $s$wand_loop1 $s$wand_loop1 = \ sc4 -> case >=# sc4 tpl1 of _ { False -> let { __DEFAULT ~ wild14 <- indexIntArray# ipv5 (+# rb3 sc4) } in case <=# (*# wild14 wild14) sc3 of _ { False -> True; True -> case wild14 of wild16 { __DEFAULT -> case remInt# sc3 wild16 of _ { __DEFAULT -> $s$wand_loop1 (+# sc4 1); 0 -> False }; (-1) -> False; 0 -> case divZeroError of wild17 { } } }; True -> True }; } in case $s$wand_loop1 0 of _ { False -> $s$wa1 x2 (wild11 `cast` ...) @~ (Buffer <(TFCo:R:PrimStateIO)> ) (+# sc3 2) (-# sc1 1) (ipv4 `cast` ...); True -> let { (# ipv6, ipv7 #) ~ _ <- ($wa1 x2 (wild11 `cast` ...) (I# sc3) (ipv4 `cast` ...)) `cast` ... } in $s$wa ipv7 (-# sc1 1) ipv6 (+# sc3 2) } } in case <=# w4 rb4 of _ { False -> $j1 rb4; True -> $j1 w4 } } in case <=# x2 0 of _ { False -> $w$j1 x2; True -> $w$j1 0 } } }; $s$wa1 $s$wa1 = \ sc sc1 sg sc2 sc3 sc4 -> case ># sc3 0 of _ { False -> (# sc4, (Buffer (I# sc) sc1) `cast` ... #); True -> case <=# sc2 y of _ { False -> (# sc4, (Buffer (I# sc) sc1) `cast` ... #); True -> let { MVector rb3 rb4 rb5 ~ wild10 <- sc1 `cast` ... } in let { (# ipv4, ipv5 #) ~ _ <- unsafeFreezeByteArray# rb5 (sc4 `cast` ...) } in let { $w$j1 $w$j1 = \ w4 -> let { $j1 $j1 = \ tpl1 -> letrec { $s$wand_loop1 $s$wand_loop1 = \ sc5 -> case >=# sc5 tpl1 of _ { False -> let { __DEFAULT ~ wild12 <- indexIntArray# ipv5 (+# rb3 sc5) } in case <=# (*# wild12 wild12) sc2 of _ { False -> True; True -> case wild12 of wild14 { __DEFAULT -> case remInt# sc2 wild14 of _ { __DEFAULT -> $s$wand_loop1 (+# sc5 1); 0 -> False }; (-1) -> False; 0 -> case divZeroError of wild15 { } } }; True -> True }; } in case $s$wand_loop1 0 of _ { False -> $s$wa1 sc (wild10 `cast` ...) @~ (Buffer <(TFCo:R:PrimStateIO)> ) (+# sc2 2) (-# sc3 1) (ipv4 `cast` ...); True -> let { (# ipv6, ipv7 #) ~ _ <- ($wa1 sc (wild10 `cast` ...) (I# sc2) (ipv4 `cast` ...)) `cast` ... } in $s$wa ipv7 (-# sc3 1) ipv6 (+# sc2 2) } } in case <=# w4 rb4 of _ { False -> $j1 rb4; True -> $j1 w4 } } in case <=# sc 0 of _ { False -> $w$j1 sc; True -> $w$j1 0 } } }; } in $s$wa ipv3 (-# ww1 1) ipv2 (+# x 2) } } in case <=# w3 rb1 of _ { False -> $j rb1; True -> $j w3 } } in case <=# x1 0 of _ { False -> $w$j x1; True -> $w$j 0 } } } main2 main2 = I# 5 main8 main8 = I# 0 main7 main7 = I# 3 main6 main6 = : main7 ([]) main5 main5 = : main4 main6 main1 main1 = \ s -> let { (# ipv, ipv1 #) ~ _ <- newByteArray# 4000 (s `cast` ...) } in let { (# ipv2, ipv3 #) ~ _ <- ((($wfoldM (bindIO1 `cast` ...) (returnIO1 `cast` ...) (main9 `cast` ...) (Buffer main8 ((MVector 0 1000 ipv1) `cast` ...)) main5) `cast` ...) (ipv `cast` ...)) `cast` ... } in let { __DEFAULT ~ ww <- $w$s^ main4 main3 } in let { (# ipv4, ipv5 #) ~ _ <- $wa SPEC ipv3 main2 ww ipv2 } in hPutStr2 stdout (let { Buffer ds4 ds5 ~ _ <- ipv5 } in let { I# ww1 ~ _ <- ds4 } in $wshowSignedInt 0 ww1 ([])) True ipv4 main main = main1 `cast` ... main13 main13 = \ eta -> runMainIO1 (main1 `cast` ...) eta main main = main13 `cast` ... ------ Local rules for imported ids -------- "SPEC ^ [Int, Integer]" [ALWAYS] forall $dNum $dIntegral. ^ $dNum $dIntegral = $s^