Commit ccaf7b66 authored by simonmar's avatar simonmar

[project @ 2001-12-10 14:00:35 by simonmar]

Make the OccName and SrcLoc fields of a Name strict, to eliminate
space leaks.  This doesn't hurt performance.
parent 2e346fb3
......@@ -52,11 +52,15 @@ import Outputable
\begin{code}
data Name = Name {
n_sort :: NameSort, -- What sort of name it is
n_occ :: OccName, -- Its occurrence name
n_occ :: !OccName, -- Its occurrence name
n_uniq :: Unique,
n_loc :: SrcLoc -- Definition site
n_loc :: !SrcLoc -- Definition site
}
-- NOTE: we make the n_loc field strict to eliminate some potential
-- (and real!) space leaks, due to the fact that we don't look at
-- the SrcLoc in a Name all that often.
data NameSort
= Global Module -- (a) TyCon, Class, their derived Ids, dfun Id
-- (b) Imported Id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment