Argument is marked as absent when it likely should not be.
This function from nofib/real/ben-raytrace carries an absent demand on the first argument. But neither does it seem absent (it appears in the body) nor should workers take an absent demand to begin with.
I'm a bit puzzled. This is from a recent build on master.
Here is the core function in full:
Rec {
-- RHS size: {terms: 298, types: 320, coercions: 50, joins: 2/6}
Sampler.sampleImagePixel_$s$wsample [Occ=LoopBreaker]
:: forall {s}.
BoundingBox.BoundingBox
-> (Ray3 -> Interval -> Maybe Hit)
-> GHC.Prim.Int#
-> (Ray3 -> Colour)
-> Pt Vec3
-> Vec3
-> Random.GenState
-> GHC.Prim.State# s
-> (# GHC.Prim.State# s, (Colour, Random.GenState) #)
[GblId,
Arity=8,
Str= <A>
<LCL(C1(L))>
<1L>
<MCM(L)>
<L>
<L>
<L>
<L>,
Unf=OtherCon []]
Sampler.sampleImagePixel_$s$wsample
= \ (@s_s2m1)
(sc_s2pI :: BoundingBox.BoundingBox)
(sc1_s2pJ :: Ray3 -> Interval -> Maybe Hit)
(sc2_s2pH :: GHC.Prim.Int#)
(sc3_s2pG :: Ray3 -> Colour)
(ww_s2ma
:: Pt Vec3
Unf=OtherCon [])
(ww1_s2mb
:: Vec3
Unf=OtherCon [])
(eta_s2md [OS=OneShot] :: Random.GenState)
(eta1_s2me [OS=OneShot] :: GHC.Prim.State# s_s2m1)
->
case sc2_s2pH of ds_X2 {
__DEFAULT ->
let {
ray_X3 :: Ray3
[LclId, Unf=OtherCon []]
ray_X3 = Ray.Ray3 ww_s2ma ww1_s2mb } in
case sc1_s2pJ ray_X3 lvl3_r2rg of {
Nothing -> (# eta1_s2me, (sc3_s2pG ray_X3, eta_s2md) #);
Just hit_aRy ->
case hit_aRy of wild1_a1W5
{ Hit bx_a1Wc ds1_a1Wd ds2_a1We ds3_a1Wf ds4_a1Wg ->
case ds4_a1Wg of { Material ds7_s2of ds8_s2og ->
case ((((ds7_s2of @s_s2m1 ray_X3 wild1_a1W5)
`cast` (SamplerMonad.Naive.N:SamplerM[0] <s_s2m1>_N <(Vec3,
Maybe Ray3)>_N
; Control.Monad.Trans.State.Strict.N:StateT[0]
<System.Random.Internal.StdGen>_N
<GHC.ST.ST s_s2m1>_R
<(Vec3, Maybe Ray3)>_N
:: SamplerM s_s2m1 (Vec3, Maybe Ray3)
~R# (System.Random.Internal.StdGen
-> GHC.ST.ST
s_s2m1
((Vec3, Maybe Ray3), System.Random.Internal.StdGen))))
eta_s2md)
`cast` (GHC.ST.N:ST[0]
<s_s2m1>_N <((Vec3, Maybe Ray3), System.Random.Internal.StdGen)>_R
:: GHC.ST.ST
s_s2m1 ((Vec3, Maybe Ray3), System.Random.Internal.StdGen)
~R# GHC.ST.STRep
s_s2m1 ((Vec3, Maybe Ray3), System.Random.Internal.StdGen)))
eta1_s2me
of
{ (# ipv_a29P, ipv1_a29Q #) ->
case ipv1_a29Q of { (a1_a29T, s'_a29U) ->
case a1_a29T of { (atten_aRA, mb_scattered_aRB) ->
case mb_scattered_aRB of {
Nothing ->
case ds8_s2og of {
Figure.NoEmission ->
(# ipv_a29P,
(Colour.black1
`cast` (Sym (Colour.N:Colour[0]) :: Vec3 ~R# Colour),
s'_a29U) #);
Figure.ConstEmission x_a1Vb -> (# ipv_a29P, (x_a1Vb, s'_a29U) #)
};
Just scattered_aRC ->
case GHC.Prim.<# ds_X2 45# of {
__DEFAULT ->
case scattered_aRC of { Ray3 ww2_X9 ww3_Xa ->
case Sampler.sampleImagePixel_$s$wsample
@s_s2m1
sc_s2pI
sc1_s2pJ
(GHC.Prim.-# ds_X2 1#)
sc3_s2pG
ww2_X9
ww3_Xa
s'_a29U
ipv_a29P
of
{ (# ipv2_Xc, ipv3_Xd #) ->
case ipv3_Xd of { (a2_Xf, s'1_Xg) ->
case ds8_s2og of {
Figure.NoEmission ->
case atten_aRA of { Vec3 bx1_a2aF bx2_a2aG bx3_a2aH ->
case a2_Xf `cast` (Colour.N:Colour[0] :: Colour ~R# Vec3) of
{ Vec3 bx4_a2aK bx5_a2aL bx6_a2aM ->
(# ipv2_Xc,
((Vector.Vec3
(GHC.Prim.*## bx1_a2aF bx4_a2aK)
(GHC.Prim.*## bx2_a2aG bx5_a2aL)
(GHC.Prim.*## bx3_a2aH bx6_a2aM))
`cast` (Sym (Colour.N:Colour[0]) :: Vec3 ~R# Colour),
s'1_Xg) #)
}
};
Figure.ConstEmission x_a1Vb ->
case x_a1Vb `cast` (Colour.N:Colour[0] :: Colour ~R# Vec3) of
{ Vec3 bx3_s2oj bx4_s2ok bx5_s2ol ->
case atten_aRA of { Vec3 bx1_a2aF bx2_a2aG bx6_a2aH ->
case a2_Xf `cast` (Colour.N:Colour[0] :: Colour ~R# Vec3) of
{ Vec3 bx7_a2aK bx8_a2aL bx9_a2aM ->
(# ipv2_Xc,
((Vector.Vec3
(GHC.Prim.+## (GHC.Prim.*## bx1_a2aF bx7_a2aK) bx3_s2oj)
(GHC.Prim.+## (GHC.Prim.*## bx2_a2aG bx8_a2aL) bx4_s2ok)
(GHC.Prim.+## (GHC.Prim.*## bx6_a2aH bx9_a2aM) bx5_s2ol))
`cast` (Sym (Colour.N:Colour[0]) :: Vec3 ~R# Colour),
s'1_Xg) #)
}
}
}
}
}
}
};
1# ->
case s'_a29U
`cast` (System.Random.Internal.N:StdGen[0]
:: System.Random.Internal.StdGen
~R# System.Random.SplitMix.SMGen)
of
{ System.Random.SplitMix.SMGen bx1_a2jl bx2_a2jm ->
case atten_aRA of { Vec3 bx3_a1VB bx4_a1VC bx5_a1VD ->
join {
$w$j_s2lZ [InlPrag=[2], Dmd=1C1(L)]
:: GHC.Prim.Double#
-> (# GHC.Prim.State# s_s2m1, (Colour, Random.GenState) #)
[LclId[JoinId(1)], Arity=1, Str=<L>, Unf=OtherCon []]
$w$j_s2lZ (x1_s2lW [OS=OneShot] :: GHC.Prim.Double#)
= join {
$j_s2jH [Dmd=1C1(L)]
:: GHC.Prim.Double#
-> (# GHC.Prim.State# s_s2m1, (Colour, Random.GenState) #)
[LclId[JoinId(1)], Arity=1, Str=<L>, Unf=OtherCon []]
$j_s2jH (x_a2b7 [OS=OneShot] :: GHC.Prim.Double#)
= let {
seed'_a2jk :: GHC.Prim.Word#
[LclId]
seed'_a2jk = GHC.Prim.plusWord# bx1_a2jl bx2_a2jm } in
let {
x#_a2jo :: GHC.Prim.Word#
[LclId]
x#_a2jo
= GHC.Prim.timesWord#
(GHC.Prim.xor#
seed'_a2jk (GHC.Prim.uncheckedShiftRL# seed'_a2jk 33#))
18397679294719823053## } in
let {
x#1_a2jp :: GHC.Prim.Word#
[LclId]
x#1_a2jp
= GHC.Prim.timesWord#
(GHC.Prim.xor#
x#_a2jo (GHC.Prim.uncheckedShiftRL# x#_a2jo 33#))
14181476777654086739## } in
case GHC.Prim.>##
x_a2b7
(GHC.Prim./##
(GHC.Prim.word2Double#
(GHC.Prim.xor#
x#1_a2jp
(GHC.Prim.uncheckedShiftRL# x#1_a2jp 33#)))
1.8446744073709552e19##)
of {
__DEFAULT ->
case ds8_s2og of {
Figure.NoEmission ->
(# ipv_a29P,
(Colour.black1
`cast` (Sym (Colour.N:Colour[0]) :: Vec3 ~R# Colour),
(System.Random.SplitMix.SMGen seed'_a2jk bx2_a2jm)
`cast` (Sym (System.Random.Internal.N:StdGen[0])
:: System.Random.SplitMix.SMGen
~R# System.Random.Internal.StdGen)) #);
Figure.ConstEmission x2_a1Vb ->
(# ipv_a29P,
(x2_a1Vb,
(System.Random.SplitMix.SMGen seed'_a2jk bx2_a2jm)
`cast` (Sym (System.Random.Internal.N:StdGen[0])
:: System.Random.SplitMix.SMGen
~R# System.Random.Internal.StdGen)) #)
};
1# ->
case scattered_aRC of { Ray3 ww2_X9 ww3_Xa ->
case Sampler.sampleImagePixel_$s$wsample
@s_s2m1
sc_s2pI
sc1_s2pJ
(GHC.Prim.-# ds_X2 1#)
sc3_s2pG
ww2_X9
ww3_Xa
((System.Random.SplitMix.SMGen seed'_a2jk bx2_a2jm)
`cast` (Sym (System.Random.Internal.N:StdGen[0])
:: System.Random.SplitMix.SMGen
~R# System.Random.Internal.StdGen))
ipv_a29P
of
{ (# ipv2_Xk, ipv3_Xl #) ->
case ipv3_Xl of { (a2_Xn, s'1_Xo) ->
case ds8_s2og of {
Figure.NoEmission ->
case a2_Xn `cast` (Colour.N:Colour[0] :: Colour ~R# Vec3)
of
{ Vec3 bx6_a2aK bx7_a2aL bx8_a2aM ->
(# ipv2_Xk,
((Vector.Vec3
(GHC.Prim.*## bx3_a1VB bx6_a2aK)
(GHC.Prim.*## bx4_a1VC bx7_a2aL)
(GHC.Prim.*## bx5_a1VD bx8_a2aM))
`cast` (Sym (Colour.N:Colour[0]) :: Vec3 ~R# Colour),
s'1_Xo) #)
};
Figure.ConstEmission x2_a1Vb ->
case x2_a1Vb
`cast` (Colour.N:Colour[0] :: Colour ~R# Vec3)
of
{ Vec3 bx6_s2oo bx7_s2op bx8_s2oq ->
case a2_Xn `cast` (Colour.N:Colour[0] :: Colour ~R# Vec3)
of
{ Vec3 bx9_a2aK bx10_a2aL bx11_a2aM ->
(# ipv2_Xk,
((Vector.Vec3
(GHC.Prim.+##
(GHC.Prim.*## bx3_a1VB bx9_a2aK) bx6_s2oo)
(GHC.Prim.+##
(GHC.Prim.*## bx4_a1VC bx10_a2aL) bx7_s2op)
(GHC.Prim.+##
(GHC.Prim.*## bx5_a1VD bx11_a2aM) bx8_s2oq))
`cast` (Sym (Colour.N:Colour[0]) :: Vec3 ~R# Colour),
s'1_Xo) #)
}
}
}
}
}
}
} } in
case GHC.Prim.<=## x1_s2lW bx5_a1VD of {
__DEFAULT -> jump $j_s2jH x1_s2lW;
1# -> jump $j_s2jH bx5_a1VD
} } in
case GHC.Prim.<=## bx3_a1VB bx4_a1VC of {
__DEFAULT -> jump $w$j_s2lZ bx3_a1VB;
1# -> jump $w$j_s2lZ bx4_a1VC
}
}
}
}
}
}
}
}
}
}
};
-1# ->
(# eta1_s2me,
(Colour.black1
`cast` (Sym (Colour.N:Colour[0]) :: Vec3 ~R# Colour),
eta_s2md) #)
}
end Rec }
@sgraf812 Maybe you have an idea?