| | 11 | == Notes on the type system (and its interactions) == |
| | 12 | |
| | 13 | The compiler is, of course, found in the fptools/compiler directory. Important subdirectories for hacking on the type system include: |
| | 14 | * basicTypes (Name, Var, OccName) |
| | 15 | * prelude (PrelNames, TysWiredIn) |
| | 16 | * types |
| | 17 | * typecheck |
| | 18 | * iface (IfaceType, BinIface) |
| | 19 | * parser (ParserCore) |
| | 20 | |
| | 21 | The critical parts dealing with types are in the 'types' and 'typecheck' directories: |
| | 22 | |
| | 23 | === types === |
| | 24 | * TypeRep.lhs |
| | 25 | * The representation of types, the Type datatype, is defined here and exported concretely |
| | 26 | * A few crucial type constructors (like ->) are defined here in order to avoid excessive module loops |
| | 27 | * TyCon.lhs |
| | 28 | * The representation of type constructors, TyCon, is defined here and exported abstractly |
| | 29 | * Construction and manipulation functions for type constructors are here |
| | 30 | * Type.lhs |
| | 31 | * Contains the bulk of the type system, imports the concrete representation from TypeRep, and re-exports Type abstractly |