Make `GHC.Stack.SrcLoc` more strict?
While inspecting the core of a library I wrote, I noticed that there are a lot of SrcLoc
s being generated. SrcLoc
has four Int
fields (without strictness annotations), so there are a lot of (boxed) Int
s floating around for the line/column numbers.
Is there any reason those aren't strict? As far as I can tell, the line/column numbers are all known at compile time anyway. Adding strictness annotations would allow them to be unboxed, resulting in less allocations (and make the generated core smaller).