Skip to content

NFData Name doesn't force enough

instance NFData Name where
  rnf Name{..} = rnf n_sort

Notably:

Doesn't force the lazy OccName field (#19619) which is already known as a really bad source of leaks.

When we slam the hammer storing Names on disk (in interface files or the like), all this should be forced as otherwise a Name can easily retain an Id and hence the entire world.

 instance NFData Name where
-  rnf Name{..} = rnf n_sort
+  rnf Name{..} = rnf n_sort `seq` rnf n_occ `seq` n_uniq `seq` rnf n_loc
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information