Aha, thanks Csaba. So I’m not losing my marbles. The AST has a type
signature of the “initial” but implements the “lowered”. So with-ddump-stg
we can observe it:The version claimed in the type signature (returning a tuple):
Foreign.it :: Foreign.C.Types.CDouble [GblId] = [] \u [] case ds_r1HA of { GHC.Types.D# ds2_s1HW [Occ=Once] -> case __pkg_ccall_GC main [ds2_s1HW GHC.Prim.realWorld#] of { (#,#) _ [Occ=Dead] ds4_s1I0 [Occ=Once] -> GHC.Types.D# [ds4_s1I0]; }; };
The final “lowered” version:
Foreign.it :: Foreign.C.Types.CDouble [GblId] = [] \u [] case ds_r1HA of { GHC.Types.D# ds2_s1HW [Occ=Once] -> case __pkg_ccall_GC main [ds2_s1HW GHC.Prim.realWorld#] of { Unit# ds4_s1I0 [Occ=Once] -> GHC.Types.D# [ds4_s1I0]; }; };
Cheers!
Chris