| 22 | | All wired-in things have a `WiredIn` `Name` (see [wiki:Commentary/Compiler/NameType Names]), which in turn contains the thing. For example ([[GhcFile(compiler/prelude/TysWiredIn.lhs)]]): |
| 23 | | {{{ |
| 24 | | boolTyCon :: TyCon |
| 25 | | boolTyCon = mkAlgTyCon boolTyConName ...more details... |
| 26 | | |
| 27 | | boolTyConName :: Name |
| 28 | | boolTyConName = mkWiredInName gHC_BASE (mkOccNameFS tcName FSLIT("Bool")) |
| 29 | | boolTyConKey Nothing |
| 30 | | (ATyCon boolTyCon) UserSyntax |
| 31 | | }}} |
| 32 | | Notice that the `TyCon` has a `Name` that contains the `TyCon`. They each point to the other. |
| | 22 | All wired-in things have a `WiredIn` `Name` (see [wiki:Commentary/Compiler/NameType Names]), which in turn contains the thing. See [wiki:Commentary/Compiler/CaseStudies/Bool a case study of Bool implementation] for more details. |