Skip to content

Make `Int` fields in `GHC.Stack.Types.SrcLoc` strict

konsumlamm requested to merge srcloc-strict into master

Implement https://github.com/haskell/core-libraries-committee/issues/55.

While the patch makes the Int fields unpacked, for some reason this doesn't seem to apply to the compiler-generated SrcLocs (from HasCallStack). I have a gist that shows the code I used to test this patch and the resulting core output. As you can see, the compiler-generated SrcLoc (lvl9_rNc) still has Int fields, while the manually created one (mySrcLoc) has Int# fields. I'd really like to know what's going on here, since the whole point of the proposal was to reduce the generated core for functions using HasCallStack, by eliminating all the top-level Int bindings.

Merge request reports