Source ticks are incorrectly thrown out when typechecking interface files
TcIface.tcIfaceExpr
as of today has the following:
-- If debug flag is not set: Ignore source notes
dbgLvl <- fmap debugLevel getDynFlags
case tickish of
IfaceSource{} | dbgLvl > 0
-> return expr'
_otherwise -> do
tickish' <- tcIfaceTickish tickish
return (Tick tickish' expr')
The check on dbgLvl
is inverted, throwing away the source tick if the debug level is non-zero. The check should rather be == 0
.