Skip to content

Instantly share code, notes, and snippets.

@chessai
Created January 9, 2019 18:11
Show Gist options
  • Save chessai/a1090722d0a16d2f9c23e314a5b53a58 to your computer and use it in GitHub Desktop.
Save chessai/a1090722d0a16d2f9c23e314a5b53a58 to your computer and use it in GitHub Desktop.
fixedparser core inspection
[1 of 1] Compiling ParseFooA ( foo.hs, foo.o )
==================== Tidy Core ====================
Result size of Tidy Core
= {terms: 816, types: 382, coercions: 40, joins: 0/9}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule4
$trModule4 = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule3
$trModule3 = TrNameS $trModule4
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule2
$trModule2 = "ParseFooA"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule1
$trModule1 = TrNameS $trModule2
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$trModule
$trModule = Module $trModule3 $trModule1
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep_r24d
$krep_r24d = KindRepTyConApp $tcWord8 []
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep1_r24e
$krep1_r24e = KindRepTyConApp $tcWord16 []
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep2_r24f
$krep2_r24f = KindRepTyConApp $tcWord32 []
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep3_r24g
$krep3_r24g = KindRepTyConApp $tcWord64 []
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo9
$tcFoo9 = "Foo8"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo7
$tcFoo7 = TrNameS $tcFoo9
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo8
$tcFoo8
= TyCon
5193144384226821978##
12546489480666961070##
$trModule
$tcFoo7
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep4_r24h
$krep4_r24h = KindRepTyConApp $tcFoo8 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep5_r24i
$krep5_r24i = KindRepFun $krep_r24d $krep4_r24h
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep6_r24j
$krep6_r24j = KindRepFun $krep_r24d $krep5_r24i
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep7_r24k
$krep7_r24k = KindRepFun $krep_r24d $krep6_r24j
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo11
$tc'Foo11 = KindRepFun $krep_r24d $krep7_r24k
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo13
$tc'Foo13 = "'Foo8"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo12
$tc'Foo12 = TrNameS $tc'Foo13
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo8
$tc'Foo8
= TyCon
8609705848374136263##
16544692194860911950##
$trModule
$tc'Foo12
0#
$tc'Foo11
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo2
$tcFoo2 = "Foo16"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo1
$tcFoo1 = TrNameS $tcFoo2
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo16
$tcFoo16
= TyCon
9719516215970902146##
1843486176185520512##
$trModule
$tcFoo1
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep8_r24l
$krep8_r24l = KindRepTyConApp $tcFoo16 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep9_r24m
$krep9_r24m = KindRepFun $krep1_r24e $krep8_r24l
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep10_r24n
$krep10_r24n = KindRepFun $krep1_r24e $krep9_r24m
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep11_r24o
$krep11_r24o = KindRepFun $krep1_r24e $krep10_r24n
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo1
$tc'Foo1 = KindRepFun $krep1_r24e $krep11_r24o
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo3
$tc'Foo3 = "'Foo16"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo2
$tc'Foo2 = TrNameS $tc'Foo3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo16
$tc'Foo16
= TyCon
6183527826479358113##
1155842560196962168##
$trModule
$tc'Foo2
0#
$tc'Foo1
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo4
$tcFoo4 = "Foo32"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo3
$tcFoo3 = TrNameS $tcFoo4
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo32
$tcFoo32
= TyCon
3978452889407739714##
11345814832458118438##
$trModule
$tcFoo3
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep12_r24p
$krep12_r24p = KindRepTyConApp $tcFoo32 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep13_r24q
$krep13_r24q = KindRepFun $krep2_r24f $krep12_r24p
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep14_r24r
$krep14_r24r = KindRepFun $krep2_r24f $krep13_r24q
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep15_r24s
$krep15_r24s = KindRepFun $krep2_r24f $krep14_r24r
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo4
$tc'Foo4 = KindRepFun $krep2_r24f $krep15_r24s
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo6
$tc'Foo6 = "'Foo32"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo5
$tc'Foo5 = TrNameS $tc'Foo6
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo32
$tc'Foo32
= TyCon
2625846881840172308##
7061990557540550310##
$trModule
$tc'Foo5
0#
$tc'Foo4
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo6
$tcFoo6 = "Foo64"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo5
$tcFoo5 = TrNameS $tcFoo6
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo64
$tcFoo64
= TyCon
8690422697604551936##
15791856533518899746##
$trModule
$tcFoo5
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep16_r24t
$krep16_r24t = KindRepTyConApp $tcFoo64 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep17_r24u
$krep17_r24u = KindRepFun $krep3_r24g $krep16_r24t
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep18_r24v
$krep18_r24v = KindRepFun $krep3_r24g $krep17_r24u
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep19_r24w
$krep19_r24w = KindRepFun $krep3_r24g $krep18_r24v
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo7
$tc'Foo7 = KindRepFun $krep3_r24g $krep19_r24w
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo10
$tc'Foo10 = "'Foo64"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo9
$tc'Foo9 = TrNameS $tc'Foo10
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo64
$tc'Foo64
= TyCon
4217437897250552401##
18372992898593967538##
$trModule
$tc'Foo9
0#
$tc'Foo7
-- RHS size: {terms: 237, types: 67, coercions: 0, joins: 0/3}
parseFoo3
parseFoo3
= \ eta_a1Wq eta1_a1Wr eta2_a1Ws ->
case >=# (-# eta2_a1Ws eta1_a1Wr) 32# of {
__DEFAULT -> (# eta2_a1Ws, (#_|#) () #);
1# ->
(# +# eta1_a1Wr 32#,
(#|_#)
(Foo64
(case indexWord8Array# eta_a1Wq (+# eta1_a1Wr 4#) of byteE_a1N6
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# eta1_a1Wr 3#) of byteD_a1N7
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# eta1_a1Wr 2#) of byteC_a1N8
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# eta1_a1Wr 1#) of byteB_a1N9
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq eta1_a1Wr of byteA_a1Na
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Na 32#)
(uncheckedShiftL# byteB_a1N9 24#))
(uncheckedShiftL# byteC_a1N8 16#))
(uncheckedShiftL# byteD_a1N7 8#))
byteE_a1N6)
}
}
}
}
})
(let {
off_s1Vb
off_s1Vb = +# eta1_a1Wr 8# } in
case indexWord8Array# eta_a1Wq (+# off_s1Vb 4#) of byteE_a1N6
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# off_s1Vb 3#) of byteD_a1N7
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# off_s1Vb 2#) of byteC_a1N8
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# off_s1Vb 1#) of byteB_a1N9
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq off_s1Vb of byteA_a1Na
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Na 32#)
(uncheckedShiftL# byteB_a1N9 24#))
(uncheckedShiftL# byteC_a1N8 16#))
(uncheckedShiftL# byteD_a1N7 8#))
byteE_a1N6)
}
}
}
}
})
(let {
off_s1V9
off_s1V9 = +# eta1_a1Wr 16# } in
case indexWord8Array# eta_a1Wq (+# off_s1V9 4#) of byteE_a1N6
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# off_s1V9 3#) of byteD_a1N7
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# off_s1V9 2#) of byteC_a1N8
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# off_s1V9 1#) of byteB_a1N9
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq off_s1V9 of byteA_a1Na
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Na 32#)
(uncheckedShiftL# byteB_a1N9 24#))
(uncheckedShiftL# byteC_a1N8 16#))
(uncheckedShiftL# byteD_a1N7 8#))
byteE_a1N6)
}
}
}
}
})
(let {
off_s1V7
off_s1V7 = +# eta1_a1Wr 24# } in
case indexWord8Array# eta_a1Wq (+# off_s1V7 4#) of byteE_a1N6
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# off_s1V7 3#) of byteD_a1N7
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# off_s1V7 2#) of byteC_a1N8
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq (+# off_s1V7 1#) of byteB_a1N9
{ __DEFAULT ->
case indexWord8Array# eta_a1Wq off_s1V7 of byteA_a1Na
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Na 32#)
(uncheckedShiftL# byteB_a1N9 24#))
(uncheckedShiftL# byteC_a1N8 16#))
(uncheckedShiftL# byteD_a1N7 8#))
byteE_a1N6)
}
}
}
}
})) #)
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo64
parseFoo64 = parseFoo3 `cast` <Co:10>
-- RHS size: {terms: 193, types: 63, coercions: 0, joins: 0/3}
parseFoo2
parseFoo2
= \ eta_X1YC eta1_X1YE eta2_X1YG ->
case >=# (-# eta2_X1YG eta1_X1YE) 16# of {
__DEFAULT -> (# eta2_X1YG, (#_|#) () #);
1# ->
(# +# eta1_X1YE 16#,
(#|_#)
(Foo32
(case indexWord8Array# eta_X1YC (+# eta1_X1YE 3#) of byteD_a1MP
{ __DEFAULT ->
case indexWord8Array# eta_X1YC (+# eta1_X1YE 2#) of byteC_a1MQ
{ __DEFAULT ->
case indexWord8Array# eta_X1YC (+# eta1_X1YE 1#) of byteB_a1MR
{ __DEFAULT ->
case indexWord8Array# eta_X1YC eta1_X1YE of byteA_a1MS
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1MS 24#)
(uncheckedShiftL# byteB_a1MR 16#))
(uncheckedShiftL# byteC_a1MQ 8#))
byteD_a1MP)
}
}
}
})
(let {
off_s1V5
off_s1V5 = +# eta1_X1YE 4# } in
case indexWord8Array# eta_X1YC (+# off_s1V5 3#) of byteD_a1MP
{ __DEFAULT ->
case indexWord8Array# eta_X1YC (+# off_s1V5 2#) of byteC_a1MQ
{ __DEFAULT ->
case indexWord8Array# eta_X1YC (+# off_s1V5 1#) of byteB_a1MR
{ __DEFAULT ->
case indexWord8Array# eta_X1YC off_s1V5 of byteA_a1MS
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1MS 24#)
(uncheckedShiftL# byteB_a1MR 16#))
(uncheckedShiftL# byteC_a1MQ 8#))
byteD_a1MP)
}
}
}
})
(let {
off_s1V3
off_s1V3 = +# eta1_X1YE 8# } in
case indexWord8Array# eta_X1YC (+# off_s1V3 3#) of byteD_a1MP
{ __DEFAULT ->
case indexWord8Array# eta_X1YC (+# off_s1V3 2#) of byteC_a1MQ
{ __DEFAULT ->
case indexWord8Array# eta_X1YC (+# off_s1V3 1#) of byteB_a1MR
{ __DEFAULT ->
case indexWord8Array# eta_X1YC off_s1V3 of byteA_a1MS
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1MS 24#)
(uncheckedShiftL# byteB_a1MR 16#))
(uncheckedShiftL# byteC_a1MQ 8#))
byteD_a1MP)
}
}
}
})
(let {
off_s1V1
off_s1V1 = +# eta1_X1YE 12# } in
case indexWord8Array# eta_X1YC (+# off_s1V1 3#) of byteD_a1MP
{ __DEFAULT ->
case indexWord8Array# eta_X1YC (+# off_s1V1 2#) of byteC_a1MQ
{ __DEFAULT ->
case indexWord8Array# eta_X1YC (+# off_s1V1 1#) of byteB_a1MR
{ __DEFAULT ->
case indexWord8Array# eta_X1YC off_s1V1 of byteA_a1MS
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1MS 24#)
(uncheckedShiftL# byteB_a1MR 16#))
(uncheckedShiftL# byteC_a1MQ 8#))
byteD_a1MP)
}
}
}
})) #)
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo32
parseFoo32 = parseFoo2 `cast` <Co:10>
-- RHS size: {terms: 105, types: 55, coercions: 0, joins: 0/3}
parseFoo1
parseFoo1
= \ eta_X1YL eta1_X1YN eta2_X1YP ->
case >=# (-# eta2_X1YP eta1_X1YN) 8# of {
__DEFAULT -> (# eta2_X1YP, (#_|#) () #);
1# ->
(# +# eta1_X1YN 8#,
(#|_#)
(Foo16
(case indexWord8Array# eta_X1YL (+# eta1_X1YN 1#) of byteB_a1MC
{ __DEFAULT ->
case indexWord8Array# eta_X1YL eta1_X1YN of byteA_a1MD
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1MD 8#) byteB_a1MC)
}
})
(let {
off_s1UZ
off_s1UZ = +# eta1_X1YN 2# } in
case indexWord8Array# eta_X1YL (+# off_s1UZ 1#) of byteB_a1MC
{ __DEFAULT ->
case indexWord8Array# eta_X1YL off_s1UZ of byteA_a1MD
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1MD 8#) byteB_a1MC)
}
})
(let {
off_s1UX
off_s1UX = +# eta1_X1YN 4# } in
case indexWord8Array# eta_X1YL (+# off_s1UX 1#) of byteB_a1MC
{ __DEFAULT ->
case indexWord8Array# eta_X1YL off_s1UX of byteA_a1MD
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1MD 8#) byteB_a1MC)
}
})
(let {
off_s1UV
off_s1UV = +# eta1_X1YN 6# } in
case indexWord8Array# eta_X1YL (+# off_s1UV 1#) of byteB_a1MC
{ __DEFAULT ->
case indexWord8Array# eta_X1YL off_s1UV of byteA_a1MD
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1MD 8#) byteB_a1MC)
}
})) #)
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo16
parseFoo16 = parseFoo1 `cast` <Co:10>
-- RHS size: {terms: 55, types: 48, coercions: 0, joins: 0/0}
parseFoo4
parseFoo4
= \ eta_X1YU eta1_X1YW eta2_X1YY ->
case >=# (-# eta2_X1YY eta1_X1YW) 4# of {
__DEFAULT -> (# eta2_X1YY, (#_|#) () #);
1# ->
(# +# eta1_X1YW 4#,
(#|_#)
(Foo8
(case indexWord8Array# eta_X1YU eta1_X1YW of wild_a1Mc
{ __DEFAULT ->
W8# wild_a1Mc
})
(case indexWord8Array# eta_X1YU (+# eta1_X1YW 1#) of wild_a1Mc
{ __DEFAULT ->
W8# wild_a1Mc
})
(case indexWord8Array# eta_X1YU (+# eta1_X1YW 2#) of wild_a1Mc
{ __DEFAULT ->
W8# wild_a1Mc
})
(case indexWord8Array# eta_X1YU (+# eta1_X1YW 3#) of wild_a1Mc
{ __DEFAULT ->
W8# wild_a1Mc
})) #)
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo8
parseFoo8 = parseFoo4 `cast` <Co:10>
module ParseFooA (parseFoo8, parseFoo16, parseFoo32, parseFoo64) where
import Data.Word (Word8, Word16, Word32, Word64)
import Packed.Bytes.Parser
data Foo8 = Foo8 Word8 Word8 Word8 Word8
data Foo16 = Foo16 Word16 Word16 Word16 Word16
data Foo32 = Foo32 Word32 Word32 Word32 Word32
data Foo64 = Foo64 Word64 Word64 Word64 Word64
type Parser' = Parser ()
word8' = word8 ()
word16' = bigEndianWord16 ()
word32' = bigEndianWord32 ()
word64' = bigEndianWord64 ()
parseFoo8 :: Parser' Foo8
parseFoo8 = Foo8 <$> word8' <*> word8' <*> word8' <*> word8'
parseFoo16 :: Parser' Foo16
parseFoo16 = Foo16 <$> word16' <*> word16' <*> word16' <*> word16'
parseFoo32 :: Parser' Foo32
parseFoo32 = Foo32 <$> word32' <*> word32' <*> word32' <*> word32'
parseFoo64 :: Parser' Foo64
parseFoo64 = Foo64 <$> word64' <*> word64' <*> word64' <*> word64'
==================== Tidy Core ====================
Result size of Tidy Core
= {terms: 966, types: 637, coercions: 40, joins: 0/12}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule4
$trModule4 = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule3
$trModule3 = TrNameS $trModule4
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule2
$trModule2 = "ParseFooM"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule1
$trModule1 = TrNameS $trModule2
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$trModule
$trModule = Module $trModule3 $trModule1
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep_r28e
$krep_r28e = KindRepTyConApp $tcWord8 []
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep1_r28f
$krep1_r28f = KindRepTyConApp $tcWord16 []
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep2_r28g
$krep2_r28g = KindRepTyConApp $tcWord32 []
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep3_r28h
$krep3_r28h = KindRepTyConApp $tcWord64 []
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo9
$tcFoo9 = "Foo8"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo7
$tcFoo7 = TrNameS $tcFoo9
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo8
$tcFoo8
= TyCon
17445789388355270775##
4994226033322308104##
$trModule
$tcFoo7
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep4_r28i
$krep4_r28i = KindRepTyConApp $tcFoo8 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep5_r28j
$krep5_r28j = KindRepFun $krep_r28e $krep4_r28i
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep6_r28k
$krep6_r28k = KindRepFun $krep_r28e $krep5_r28j
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep7_r28l
$krep7_r28l = KindRepFun $krep_r28e $krep6_r28k
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo11
$tc'Foo11 = KindRepFun $krep_r28e $krep7_r28l
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo13
$tc'Foo13 = "'Foo8"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo12
$tc'Foo12 = TrNameS $tc'Foo13
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo8
$tc'Foo8
= TyCon
12934414193216442416##
5862467336339268367##
$trModule
$tc'Foo12
0#
$tc'Foo11
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo2
$tcFoo2 = "Foo16"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo1
$tcFoo1 = TrNameS $tcFoo2
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo16
$tcFoo16
= TyCon
6099461874065421263##
15308844005533266909##
$trModule
$tcFoo1
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep8_r28m
$krep8_r28m = KindRepTyConApp $tcFoo16 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep9_r28n
$krep9_r28n = KindRepFun $krep1_r28f $krep8_r28m
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep10_r28o
$krep10_r28o = KindRepFun $krep1_r28f $krep9_r28n
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep11_r28p
$krep11_r28p = KindRepFun $krep1_r28f $krep10_r28o
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo1
$tc'Foo1 = KindRepFun $krep1_r28f $krep11_r28p
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo3
$tc'Foo3 = "'Foo16"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo2
$tc'Foo2 = TrNameS $tc'Foo3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo16
$tc'Foo16
= TyCon
18187852198869025268##
4309004452725901680##
$trModule
$tc'Foo2
0#
$tc'Foo1
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo4
$tcFoo4 = "Foo32"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo3
$tcFoo3 = TrNameS $tcFoo4
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo32
$tcFoo32
= TyCon
115549963286264085##
1391044689521415956##
$trModule
$tcFoo3
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep12_r28q
$krep12_r28q = KindRepTyConApp $tcFoo32 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep13_r28r
$krep13_r28r = KindRepFun $krep2_r28g $krep12_r28q
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep14_r28s
$krep14_r28s = KindRepFun $krep2_r28g $krep13_r28r
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep15_r28t
$krep15_r28t = KindRepFun $krep2_r28g $krep14_r28s
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo4
$tc'Foo4 = KindRepFun $krep2_r28g $krep15_r28t
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo6
$tc'Foo6 = "'Foo32"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo5
$tc'Foo5 = TrNameS $tc'Foo6
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo32
$tc'Foo32
= TyCon
894778857343070962##
17860414592649183899##
$trModule
$tc'Foo5
0#
$tc'Foo4
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo6
$tcFoo6 = "Foo64"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo5
$tcFoo5 = TrNameS $tcFoo6
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo64
$tcFoo64
= TyCon
12691610400404037285##
18054136620646334550##
$trModule
$tcFoo5
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep16_r28u
$krep16_r28u = KindRepTyConApp $tcFoo64 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep17_r28v
$krep17_r28v = KindRepFun $krep3_r28h $krep16_r28u
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep18_r28w
$krep18_r28w = KindRepFun $krep3_r28h $krep17_r28v
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep19_r28x
$krep19_r28x = KindRepFun $krep3_r28h $krep18_r28w
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo7
$tc'Foo7 = KindRepFun $krep3_r28h $krep19_r28x
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo10
$tc'Foo10 = "'Foo64"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo9
$tc'Foo9 = TrNameS $tc'Foo10
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo64
$tc'Foo64
= TyCon
270996103954357692##
268442267729322313##
$trModule
$tc'Foo9
0#
$tc'Foo7
-- RHS size: {terms: 273, types: 130, coercions: 0, joins: 0/3}
parseFoo3
parseFoo3
= \ arr_a1QR off0_a1QS end_a1QT ->
case >=# (-# end_a1QT off0_a1QS) 8# of {
__DEFAULT -> (# end_a1QT, (#_|#) () #);
1# ->
let {
sc_s234
sc_s234 = +# off0_a1QS 8# } in
case >=# (-# end_a1QT sc_s234) 8# of {
__DEFAULT -> (# end_a1QT, (#_|#) () #);
1# ->
let {
ipv_X1T6
ipv_X1T6 = +# sc_s234 8# } in
case >=# (-# end_a1QT ipv_X1T6) 8# of {
__DEFAULT -> (# end_a1QT, (#_|#) () #);
1# ->
let {
ipv1_X1U1
ipv1_X1U1 = +# ipv_X1T6 8# } in
case >=# (-# end_a1QT ipv1_X1U1) 8# of {
__DEFAULT -> (# end_a1QT, (#_|#) () #);
1# ->
(# +# ipv1_X1U1 8#,
(#|_#)
(Foo64
(case indexWord8Array# arr_a1QR (+# off0_a1QS 4#) of byteE_a1Oo
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# off0_a1QS 3#) of byteD_a1Op
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# off0_a1QS 2#) of byteC_a1Oq
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# off0_a1QS 1#) of byteB_a1Or
{ __DEFAULT ->
case indexWord8Array# arr_a1QR off0_a1QS of byteA_a1Os
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Os 32#)
(uncheckedShiftL# byteB_a1Or 24#))
(uncheckedShiftL# byteC_a1Oq 16#))
(uncheckedShiftL# byteD_a1Op 8#))
byteE_a1Oo)
}
}
}
}
})
(case indexWord8Array# arr_a1QR (+# sc_s234 4#) of byteE_a1Oo
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# sc_s234 3#) of byteD_a1Op
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# sc_s234 2#) of byteC_a1Oq
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# sc_s234 1#) of byteB_a1Or
{ __DEFAULT ->
case indexWord8Array# arr_a1QR sc_s234 of byteA_a1Os { __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Os 32#)
(uncheckedShiftL# byteB_a1Or 24#))
(uncheckedShiftL# byteC_a1Oq 16#))
(uncheckedShiftL# byteD_a1Op 8#))
byteE_a1Oo)
}
}
}
}
})
(case indexWord8Array# arr_a1QR (+# ipv_X1T6 4#) of byteE_a1Oo
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# ipv_X1T6 3#) of byteD_a1Op
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# ipv_X1T6 2#) of byteC_a1Oq
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# ipv_X1T6 1#) of byteB_a1Or
{ __DEFAULT ->
case indexWord8Array# arr_a1QR ipv_X1T6 of byteA_a1Os
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Os 32#)
(uncheckedShiftL# byteB_a1Or 24#))
(uncheckedShiftL# byteC_a1Oq 16#))
(uncheckedShiftL# byteD_a1Op 8#))
byteE_a1Oo)
}
}
}
}
})
(case indexWord8Array# arr_a1QR (+# ipv1_X1U1 4#) of byteE_a1Oo
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# ipv1_X1U1 3#) of byteD_a1Op
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# ipv1_X1U1 2#) of byteC_a1Oq
{ __DEFAULT ->
case indexWord8Array# arr_a1QR (+# ipv1_X1U1 1#) of byteB_a1Or
{ __DEFAULT ->
case indexWord8Array# arr_a1QR ipv1_X1U1 of byteA_a1Os
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Os 32#)
(uncheckedShiftL# byteB_a1Or 24#))
(uncheckedShiftL# byteC_a1Oq 16#))
(uncheckedShiftL# byteD_a1Op 8#))
byteE_a1Oo)
}
}
}
}
})) #)
}
}
}
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo64
parseFoo64 = parseFoo3 `cast` <Co:10>
-- RHS size: {terms: 229, types: 126, coercions: 0, joins: 0/3}
parseFoo2
parseFoo2
= \ arr_X1TJ off0_X1TL end_X1TN ->
case >=# (-# end_X1TN off0_X1TL) 4# of {
__DEFAULT -> (# end_X1TN, (#_|#) () #);
1# ->
let {
sc_s22S
sc_s22S = +# off0_X1TL 4# } in
case >=# (-# end_X1TN sc_s22S) 4# of {
__DEFAULT -> (# end_X1TN, (#_|#) () #);
1# ->
let {
ipv_X1T8
ipv_X1T8 = +# sc_s22S 4# } in
case >=# (-# end_X1TN ipv_X1T8) 4# of {
__DEFAULT -> (# end_X1TN, (#_|#) () #);
1# ->
let {
ipv1_X1U9
ipv1_X1U9 = +# ipv_X1T8 4# } in
case >=# (-# end_X1TN ipv1_X1U9) 4# of {
__DEFAULT -> (# end_X1TN, (#_|#) () #);
1# ->
(# +# ipv1_X1U9 4#,
(#|_#)
(Foo32
(case indexWord8Array# arr_X1TJ (+# off0_X1TL 3#) of byteD_a1O7
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ (+# off0_X1TL 2#) of byteC_a1O8
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ (+# off0_X1TL 1#) of byteB_a1O9
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ off0_X1TL of byteA_a1Oa
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Oa 24#)
(uncheckedShiftL# byteB_a1O9 16#))
(uncheckedShiftL# byteC_a1O8 8#))
byteD_a1O7)
}
}
}
})
(case indexWord8Array# arr_X1TJ (+# sc_s22S 3#) of byteD_a1O7
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ (+# sc_s22S 2#) of byteC_a1O8
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ (+# sc_s22S 1#) of byteB_a1O9
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ sc_s22S of byteA_a1Oa { __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Oa 24#)
(uncheckedShiftL# byteB_a1O9 16#))
(uncheckedShiftL# byteC_a1O8 8#))
byteD_a1O7)
}
}
}
})
(case indexWord8Array# arr_X1TJ (+# ipv_X1T8 3#) of byteD_a1O7
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ (+# ipv_X1T8 2#) of byteC_a1O8
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ (+# ipv_X1T8 1#) of byteB_a1O9
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ ipv_X1T8 of byteA_a1Oa
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Oa 24#)
(uncheckedShiftL# byteB_a1O9 16#))
(uncheckedShiftL# byteC_a1O8 8#))
byteD_a1O7)
}
}
}
})
(case indexWord8Array# arr_X1TJ (+# ipv1_X1U9 3#) of byteD_a1O7
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ (+# ipv1_X1U9 2#) of byteC_a1O8
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ (+# ipv1_X1U9 1#) of byteB_a1O9
{ __DEFAULT ->
case indexWord8Array# arr_X1TJ ipv1_X1U9 of byteA_a1Oa
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Oa 24#)
(uncheckedShiftL# byteB_a1O9 16#))
(uncheckedShiftL# byteC_a1O8 8#))
byteD_a1O7)
}
}
}
})) #)
}
}
}
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo32
parseFoo32 = parseFoo2 `cast` <Co:10>
-- RHS size: {terms: 141, types: 118, coercions: 0, joins: 0/3}
parseFoo1
parseFoo1
= \ arr_X1TR off0_X1TT end_X1TV ->
case >=# (-# end_X1TV off0_X1TT) 2# of {
__DEFAULT -> (# end_X1TV, (#_|#) () #);
1# ->
let {
sc_s22M
sc_s22M = +# off0_X1TT 2# } in
case >=# (-# end_X1TV sc_s22M) 2# of {
__DEFAULT -> (# end_X1TV, (#_|#) () #);
1# ->
let {
ipv_X1Ta
ipv_X1Ta = +# sc_s22M 2# } in
case >=# (-# end_X1TV ipv_X1Ta) 2# of {
__DEFAULT -> (# end_X1TV, (#_|#) () #);
1# ->
let {
ipv1_X1Uh
ipv1_X1Uh = +# ipv_X1Ta 2# } in
case >=# (-# end_X1TV ipv1_X1Uh) 2# of {
__DEFAULT -> (# end_X1TV, (#_|#) () #);
1# ->
(# +# ipv1_X1Uh 2#,
(#|_#)
(Foo16
(case indexWord8Array# arr_X1TR (+# off0_X1TT 1#) of byteB_a1NU
{ __DEFAULT ->
case indexWord8Array# arr_X1TR off0_X1TT of byteA_a1NV
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1NV 8#) byteB_a1NU)
}
})
(case indexWord8Array# arr_X1TR (+# sc_s22M 1#) of byteB_a1NU
{ __DEFAULT ->
case indexWord8Array# arr_X1TR sc_s22M of byteA_a1NV { __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1NV 8#) byteB_a1NU)
}
})
(case indexWord8Array# arr_X1TR (+# ipv_X1Ta 1#) of byteB_a1NU
{ __DEFAULT ->
case indexWord8Array# arr_X1TR ipv_X1Ta of byteA_a1NV
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1NV 8#) byteB_a1NU)
}
})
(case indexWord8Array# arr_X1TR (+# ipv1_X1Uh 1#) of byteB_a1NU
{ __DEFAULT ->
case indexWord8Array# arr_X1TR ipv1_X1Uh of byteA_a1NV
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1NV 8#) byteB_a1NU)
}
})) #)
}
}
}
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo16
parseFoo16 = parseFoo1 `cast` <Co:10>
-- RHS size: {terms: 97, types: 114, coercions: 0, joins: 0/3}
parseFoo4
parseFoo4
= \ arr_X1TZ off0_X1U1 end_X1U3 ->
case >=# (-# end_X1U3 off0_X1U1) 1# of {
__DEFAULT -> (# end_X1U3, (#_|#) () #);
1# ->
let {
sc_s22G
sc_s22G = +# off0_X1U1 1# } in
case >=# (-# end_X1U3 sc_s22G) 1# of {
__DEFAULT -> (# end_X1U3, (#_|#) () #);
1# ->
let {
ipv_X1Tc
ipv_X1Tc = +# sc_s22G 1# } in
case >=# (-# end_X1U3 ipv_X1Tc) 1# of {
__DEFAULT -> (# end_X1U3, (#_|#) () #);
1# ->
let {
ipv1_X1Un
ipv1_X1Un = +# ipv_X1Tc 1# } in
case >=# (-# end_X1U3 ipv1_X1Un) 1# of {
__DEFAULT -> (# end_X1U3, (#_|#) () #);
1# ->
(# +# ipv1_X1Un 1#,
(#|_#)
(Foo8
(case indexWord8Array# arr_X1TZ off0_X1U1 of wild_a1Nu
{ __DEFAULT ->
W8# wild_a1Nu
})
(case indexWord8Array# arr_X1TZ sc_s22G of wild_a1Nu { __DEFAULT ->
W8# wild_a1Nu
})
(case indexWord8Array# arr_X1TZ ipv_X1Tc of wild_a1Nu
{ __DEFAULT ->
W8# wild_a1Nu
})
(case indexWord8Array# arr_X1TZ ipv1_X1Un of wild_a1Nu
{ __DEFAULT ->
W8# wild_a1Nu
})) #)
}
}
}
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo8
parseFoo8 = parseFoo4 `cast` <Co:10>
module ParseFooM (parseFoo8, parseFoo16, parseFoo32, parseFoo64) where
import Data.Word (Word8, Word16, Word32, Word64)
import Packed.Bytes.Parser
data Foo8 = Foo8 Word8 Word8 Word8 Word8
data Foo16 = Foo16 Word16 Word16 Word16 Word16
data Foo32 = Foo32 Word32 Word32 Word32 Word32
data Foo64 = Foo64 Word64 Word64 Word64 Word64
type Parser' = Parser ()
word8' = word8 ()
word16' = bigEndianWord16 ()
word32' = bigEndianWord32 ()
word64' = bigEndianWord64 ()
parseFoo8 :: Parser' Foo8
parseFoo8 = do
w1 <- word8'
w2 <- word8'
w3 <- word8'
w4 <- word8'
pure (Foo8 w1 w2 w3 w4)
parseFoo16 :: Parser' Foo16
parseFoo16 = do
w1 <- word16'
w2 <- word16'
w3 <- word16'
w4 <- word16'
pure (Foo16 w1 w2 w3 w4)
parseFoo32 :: Parser' Foo32
parseFoo32 = do
w1 <- word32'
w2 <- word32'
w3 <- word32'
w4 <- word32'
pure (Foo32 w1 w2 w3 w4)
parseFoo64 :: Parser' Foo64
parseFoo64 = do
w1 <- word64'
w2 <- word64'
w3 <- word64'
w4 <- word64'
pure (Foo64 w1 w2 w3 w4)
[1 of 1] Compiling ParseFooMA ( foo.hs, foo.o )
==================== Tidy Core ====================
Result size of Tidy Core
= {terms: 816, types: 382, coercions: 40, joins: 0/9}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule4
$trModule4 = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule3
$trModule3 = TrNameS $trModule4
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule2
$trModule2 = "ParseFooMA"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule1
$trModule1 = TrNameS $trModule2
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$trModule
$trModule = Module $trModule3 $trModule1
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep_r25D
$krep_r25D = KindRepTyConApp $tcWord8 []
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep1_r25E
$krep1_r25E = KindRepTyConApp $tcWord16 []
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep2_r25F
$krep2_r25F = KindRepTyConApp $tcWord32 []
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep3_r25G
$krep3_r25G = KindRepTyConApp $tcWord64 []
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo9
$tcFoo9 = "Foo8"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo7
$tcFoo7 = TrNameS $tcFoo9
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo8
$tcFoo8
= TyCon
16951167676349006133##
16825552267755838578##
$trModule
$tcFoo7
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep4_r25H
$krep4_r25H = KindRepTyConApp $tcFoo8 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep5_r25I
$krep5_r25I = KindRepFun $krep_r25D $krep4_r25H
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep6_r25J
$krep6_r25J = KindRepFun $krep_r25D $krep5_r25I
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep7_r25K
$krep7_r25K = KindRepFun $krep_r25D $krep6_r25J
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo11
$tc'Foo11 = KindRepFun $krep_r25D $krep7_r25K
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo13
$tc'Foo13 = "'Foo8"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo12
$tc'Foo12 = TrNameS $tc'Foo13
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo8
$tc'Foo8
= TyCon
5705825492857562839##
17998340007715538721##
$trModule
$tc'Foo12
0#
$tc'Foo11
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo2
$tcFoo2 = "Foo16"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo1
$tcFoo1 = TrNameS $tcFoo2
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo16
$tcFoo16
= TyCon
15092875256638894853##
14969631771319638173##
$trModule
$tcFoo1
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep8_r25L
$krep8_r25L = KindRepTyConApp $tcFoo16 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep9_r25M
$krep9_r25M = KindRepFun $krep1_r25E $krep8_r25L
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep10_r25N
$krep10_r25N = KindRepFun $krep1_r25E $krep9_r25M
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep11_r25O
$krep11_r25O = KindRepFun $krep1_r25E $krep10_r25N
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo1
$tc'Foo1 = KindRepFun $krep1_r25E $krep11_r25O
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo3
$tc'Foo3 = "'Foo16"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo2
$tc'Foo2 = TrNameS $tc'Foo3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo16
$tc'Foo16
= TyCon
13847940185256993518##
9258143017035600662##
$trModule
$tc'Foo2
0#
$tc'Foo1
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo4
$tcFoo4 = "Foo32"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo3
$tcFoo3 = TrNameS $tcFoo4
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo32
$tcFoo32
= TyCon
12910017075331243668##
18164105378901844708##
$trModule
$tcFoo3
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep12_r25P
$krep12_r25P = KindRepTyConApp $tcFoo32 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep13_r25Q
$krep13_r25Q = KindRepFun $krep2_r25F $krep12_r25P
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep14_r25R
$krep14_r25R = KindRepFun $krep2_r25F $krep13_r25Q
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep15_r25S
$krep15_r25S = KindRepFun $krep2_r25F $krep14_r25R
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo4
$tc'Foo4 = KindRepFun $krep2_r25F $krep15_r25S
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo6
$tc'Foo6 = "'Foo32"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo5
$tc'Foo5 = TrNameS $tc'Foo6
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo32
$tc'Foo32
= TyCon
13566785945918018022##
4997876192879029142##
$trModule
$tc'Foo5
0#
$tc'Foo4
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcFoo6
$tcFoo6 = "Foo64"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcFoo5
$tcFoo5 = TrNameS $tcFoo6
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tcFoo64
$tcFoo64
= TyCon
14360136955320074954##
18444266027676429465##
$trModule
$tcFoo5
0#
krep$*
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep16_r25T
$krep16_r25T = KindRepTyConApp $tcFoo64 []
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep17_r25U
$krep17_r25U = KindRepFun $krep3_r25G $krep16_r25T
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep18_r25V
$krep18_r25V = KindRepFun $krep3_r25G $krep17_r25U
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep19_r25W
$krep19_r25W = KindRepFun $krep3_r25G $krep18_r25V
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$tc'Foo7
$tc'Foo7 = KindRepFun $krep3_r25G $krep19_r25W
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Foo10
$tc'Foo10 = "'Foo64"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Foo9
$tc'Foo9 = TrNameS $tc'Foo10
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
$tc'Foo64
$tc'Foo64
= TyCon
7228353100913182692##
3329057720390141825##
$trModule
$tc'Foo9
0#
$tc'Foo7
-- RHS size: {terms: 237, types: 67, coercions: 0, joins: 0/3}
parseFoo3
parseFoo3
= \ eta_a1XQ eta1_a1XR eta2_a1XS ->
case >=# (-# eta2_a1XS eta1_a1XR) 32# of {
__DEFAULT -> (# eta2_a1XS, (#_|#) () #);
1# ->
(# +# eta1_a1XR 32#,
(#|_#)
(Foo64
(case indexWord8Array# eta_a1XQ (+# eta1_a1XR 4#) of byteE_a1Oy
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# eta1_a1XR 3#) of byteD_a1Oz
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# eta1_a1XR 2#) of byteC_a1OA
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# eta1_a1XR 1#) of byteB_a1OB
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ eta1_a1XR of byteA_a1OC
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1OC 32#)
(uncheckedShiftL# byteB_a1OB 24#))
(uncheckedShiftL# byteC_a1OA 16#))
(uncheckedShiftL# byteD_a1Oz 8#))
byteE_a1Oy)
}
}
}
}
})
(let {
off_s1WB
off_s1WB = +# eta1_a1XR 8# } in
case indexWord8Array# eta_a1XQ (+# off_s1WB 4#) of byteE_a1Oy
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# off_s1WB 3#) of byteD_a1Oz
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# off_s1WB 2#) of byteC_a1OA
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# off_s1WB 1#) of byteB_a1OB
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ off_s1WB of byteA_a1OC
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1OC 32#)
(uncheckedShiftL# byteB_a1OB 24#))
(uncheckedShiftL# byteC_a1OA 16#))
(uncheckedShiftL# byteD_a1Oz 8#))
byteE_a1Oy)
}
}
}
}
})
(let {
off_s1Wz
off_s1Wz = +# eta1_a1XR 16# } in
case indexWord8Array# eta_a1XQ (+# off_s1Wz 4#) of byteE_a1Oy
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# off_s1Wz 3#) of byteD_a1Oz
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# off_s1Wz 2#) of byteC_a1OA
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# off_s1Wz 1#) of byteB_a1OB
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ off_s1Wz of byteA_a1OC
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1OC 32#)
(uncheckedShiftL# byteB_a1OB 24#))
(uncheckedShiftL# byteC_a1OA 16#))
(uncheckedShiftL# byteD_a1Oz 8#))
byteE_a1Oy)
}
}
}
}
})
(let {
off_s1Wx
off_s1Wx = +# eta1_a1XR 24# } in
case indexWord8Array# eta_a1XQ (+# off_s1Wx 4#) of byteE_a1Oy
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# off_s1Wx 3#) of byteD_a1Oz
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# off_s1Wx 2#) of byteC_a1OA
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ (+# off_s1Wx 1#) of byteB_a1OB
{ __DEFAULT ->
case indexWord8Array# eta_a1XQ off_s1Wx of byteA_a1OC
{ __DEFAULT ->
W64#
(or#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1OC 32#)
(uncheckedShiftL# byteB_a1OB 24#))
(uncheckedShiftL# byteC_a1OA 16#))
(uncheckedShiftL# byteD_a1Oz 8#))
byteE_a1Oy)
}
}
}
}
})) #)
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo64
parseFoo64 = parseFoo3 `cast` <Co:10>
-- RHS size: {terms: 193, types: 63, coercions: 0, joins: 0/3}
parseFoo2
parseFoo2
= \ eta_X202 eta1_X204 eta2_X206 ->
case >=# (-# eta2_X206 eta1_X204) 16# of {
__DEFAULT -> (# eta2_X206, (#_|#) () #);
1# ->
(# +# eta1_X204 16#,
(#|_#)
(Foo32
(case indexWord8Array# eta_X202 (+# eta1_X204 3#) of byteD_a1Oh
{ __DEFAULT ->
case indexWord8Array# eta_X202 (+# eta1_X204 2#) of byteC_a1Oi
{ __DEFAULT ->
case indexWord8Array# eta_X202 (+# eta1_X204 1#) of byteB_a1Oj
{ __DEFAULT ->
case indexWord8Array# eta_X202 eta1_X204 of byteA_a1Ok
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Ok 24#)
(uncheckedShiftL# byteB_a1Oj 16#))
(uncheckedShiftL# byteC_a1Oi 8#))
byteD_a1Oh)
}
}
}
})
(let {
off_s1Wv
off_s1Wv = +# eta1_X204 4# } in
case indexWord8Array# eta_X202 (+# off_s1Wv 3#) of byteD_a1Oh
{ __DEFAULT ->
case indexWord8Array# eta_X202 (+# off_s1Wv 2#) of byteC_a1Oi
{ __DEFAULT ->
case indexWord8Array# eta_X202 (+# off_s1Wv 1#) of byteB_a1Oj
{ __DEFAULT ->
case indexWord8Array# eta_X202 off_s1Wv of byteA_a1Ok
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Ok 24#)
(uncheckedShiftL# byteB_a1Oj 16#))
(uncheckedShiftL# byteC_a1Oi 8#))
byteD_a1Oh)
}
}
}
})
(let {
off_s1Wt
off_s1Wt = +# eta1_X204 8# } in
case indexWord8Array# eta_X202 (+# off_s1Wt 3#) of byteD_a1Oh
{ __DEFAULT ->
case indexWord8Array# eta_X202 (+# off_s1Wt 2#) of byteC_a1Oi
{ __DEFAULT ->
case indexWord8Array# eta_X202 (+# off_s1Wt 1#) of byteB_a1Oj
{ __DEFAULT ->
case indexWord8Array# eta_X202 off_s1Wt of byteA_a1Ok
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Ok 24#)
(uncheckedShiftL# byteB_a1Oj 16#))
(uncheckedShiftL# byteC_a1Oi 8#))
byteD_a1Oh)
}
}
}
})
(let {
off_s1Wr
off_s1Wr = +# eta1_X204 12# } in
case indexWord8Array# eta_X202 (+# off_s1Wr 3#) of byteD_a1Oh
{ __DEFAULT ->
case indexWord8Array# eta_X202 (+# off_s1Wr 2#) of byteC_a1Oi
{ __DEFAULT ->
case indexWord8Array# eta_X202 (+# off_s1Wr 1#) of byteB_a1Oj
{ __DEFAULT ->
case indexWord8Array# eta_X202 off_s1Wr of byteA_a1Ok
{ __DEFAULT ->
W32#
(or#
(or#
(or#
(uncheckedShiftL# byteA_a1Ok 24#)
(uncheckedShiftL# byteB_a1Oj 16#))
(uncheckedShiftL# byteC_a1Oi 8#))
byteD_a1Oh)
}
}
}
})) #)
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo32
parseFoo32 = parseFoo2 `cast` <Co:10>
-- RHS size: {terms: 105, types: 55, coercions: 0, joins: 0/3}
parseFoo1
parseFoo1
= \ eta_X20b eta1_X20d eta2_X20f ->
case >=# (-# eta2_X20f eta1_X20d) 8# of {
__DEFAULT -> (# eta2_X20f, (#_|#) () #);
1# ->
(# +# eta1_X20d 8#,
(#|_#)
(Foo16
(case indexWord8Array# eta_X20b (+# eta1_X20d 1#) of byteB_a1O4
{ __DEFAULT ->
case indexWord8Array# eta_X20b eta1_X20d of byteA_a1O5
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1O5 8#) byteB_a1O4)
}
})
(let {
off_s1Wp
off_s1Wp = +# eta1_X20d 2# } in
case indexWord8Array# eta_X20b (+# off_s1Wp 1#) of byteB_a1O4
{ __DEFAULT ->
case indexWord8Array# eta_X20b off_s1Wp of byteA_a1O5
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1O5 8#) byteB_a1O4)
}
})
(let {
off_s1Wn
off_s1Wn = +# eta1_X20d 4# } in
case indexWord8Array# eta_X20b (+# off_s1Wn 1#) of byteB_a1O4
{ __DEFAULT ->
case indexWord8Array# eta_X20b off_s1Wn of byteA_a1O5
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1O5 8#) byteB_a1O4)
}
})
(let {
off_s1Wl
off_s1Wl = +# eta1_X20d 6# } in
case indexWord8Array# eta_X20b (+# off_s1Wl 1#) of byteB_a1O4
{ __DEFAULT ->
case indexWord8Array# eta_X20b off_s1Wl of byteA_a1O5
{ __DEFAULT ->
W16# (or# (uncheckedShiftL# byteA_a1O5 8#) byteB_a1O4)
}
})) #)
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo16
parseFoo16 = parseFoo1 `cast` <Co:10>
-- RHS size: {terms: 55, types: 48, coercions: 0, joins: 0/0}
parseFoo4
parseFoo4
= \ eta_X20k eta1_X20m eta2_X20o ->
case >=# (-# eta2_X20o eta1_X20m) 4# of {
__DEFAULT -> (# eta2_X20o, (#_|#) () #);
1# ->
(# +# eta1_X20m 4#,
(#|_#)
(Foo8
(case indexWord8Array# eta_X20k eta1_X20m of wild_a1NE
{ __DEFAULT ->
W8# wild_a1NE
})
(case indexWord8Array# eta_X20k (+# eta1_X20m 1#) of wild_a1NE
{ __DEFAULT ->
W8# wild_a1NE
})
(case indexWord8Array# eta_X20k (+# eta1_X20m 2#) of wild_a1NE
{ __DEFAULT ->
W8# wild_a1NE
})
(case indexWord8Array# eta_X20k (+# eta1_X20m 3#) of wild_a1NE
{ __DEFAULT ->
W8# wild_a1NE
})) #)
}
-- RHS size: {terms: 1, types: 0, coercions: 10, joins: 0/0}
parseFoo8
parseFoo8 = parseFoo4 `cast` <Co:10>
{-# LANGUAGE ApplicativeDo #-}
module ParseFooMA (parseFoo8, parseFoo16, parseFoo32, parseFoo64) where
import Data.Word (Word8, Word16, Word32, Word64)
import Packed.Bytes.Parser
data Foo8 = Foo8 Word8 Word8 Word8 Word8
data Foo16 = Foo16 Word16 Word16 Word16 Word16
data Foo32 = Foo32 Word32 Word32 Word32 Word32
data Foo64 = Foo64 Word64 Word64 Word64 Word64
type Parser' = Parser ()
word8' = word8 ()
word16' = bigEndianWord16 ()
word32' = bigEndianWord32 ()
word64' = bigEndianWord64 ()
parseFoo8 :: Parser' Foo8
parseFoo8 = do
w1 <- word8'
w2 <- word8'
w3 <- word8'
w4 <- word8'
pure (Foo8 w1 w2 w3 w4)
parseFoo16 :: Parser' Foo16
parseFoo16 = do
w1 <- word16'
w2 <- word16'
w3 <- word16'
w4 <- word16'
pure (Foo16 w1 w2 w3 w4)
parseFoo32 :: Parser' Foo32
parseFoo32 = do
w1 <- word32'
w2 <- word32'
w3 <- word32'
w4 <- word32'
pure (Foo32 w1 w2 w3 w4)
parseFoo64 :: Parser' Foo64
parseFoo64 = do
w1 <- word64'
w2 <- word64'
w3 <- word64'
w4 <- word64'
pure (Foo64 w1 w2 w3 w4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment