Changes between Version 3 and Version 4 of Commentary/Compiler/DataTypes


Ignore:
Timestamp:
Jun 24, 2013 10:38:40 AM (2 years ago)
Author:
adamgundry
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/DataTypes

    v3 v4  
    2525The "wrapper data con"           $WMkT  VarName       Its wrapper Id (optional)
    2626}}}
    27 Recall that each occurrence name (OccName) is a pair of a string and a name space (see [http://darcs.haskell.org/ghc/docs/comm/the-beast/names.html The truth about names] (TODO: Point at new commentary equivalent)), and two OccNames are considered the same only if both components match. That is what distinguishes the name of the name of the DataCon from the name of its worker Id. To keep things unambiguous, in what follows we'll write "MkT{d}" for the source data con, and "MkT{v}" for the worker Id. (Indeed, when you dump stuff with "-ddumpXXX", if you also add "-dppr-debug" you'll get stuff like "Foo {- d rMv -}". The "d" part is the name space; the "rMv" is the unique key.)
     27Recall that each occurrence name (OccName) is a pair of a string and a name space (see [wiki:Commentary/Compiler/RdrNameType#TheOccNametype RdrNames, Modules, and OccNames]), and two OccNames are considered the same only if both components match. That is what distinguishes the name of the name of the DataCon from the name of its worker Id. To keep things unambiguous, in what follows we'll write "MkT{d}" for the source data con, and "MkT{v}" for the worker Id. (Indeed, when you dump stuff with "-ddumpXXX", if you also add "-dppr-debug" you'll get stuff like "Foo {- d rMv -}". The "d" part is the name space; the "rMv" is the unique key.)
    2828
    2929Each of these three names gets a distinct unique key in GHC's name cache.