X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FbasicTypes%2FName.lhs;h=aac7670cb88e9cafe7a00bdfc5c61e7b79703bc3;hp=f2ae963891b9f114302306c508e7201fdfdcd937;hb=1c6d61ee06972de3c4797e1925e265f7dc7c361c;hpb=93b6e53272695a66d97bd2672dd366797176d5c5 diff --git a/compiler/basicTypes/Name.lhs b/compiler/basicTypes/Name.lhs index f2ae963..aac7670 100644 --- a/compiler/basicTypes/Name.lhs +++ b/compiler/basicTypes/Name.lhs @@ -64,6 +64,7 @@ module Name ( getSrcLoc, getSrcSpan, getOccString, pprInfixName, pprPrefixName, pprModulePrefix, + getNameDepth, setNameDepth, -- Re-export the OccName stuff module OccName @@ -112,6 +113,12 @@ data Name = Name { -- (and real!) space leaks, due to the fact that we don't look at -- the SrcLoc in a Name all that often. +setNameDepth :: Int -> Name -> Name +setNameDepth depth name = name { n_occ = setOccNameDepth depth (n_occ name) } + +getNameDepth :: Name -> Int +getNameDepth name = getOccNameDepth $ n_occ name + data NameSort = External Module