This directory contains the source code for the runtime system.
There are three types of files:
Header files that are private to the RTS. That is, header files in this directory are
not shipped with GHC, and APIs they define are therefore intended to be private and not
usable by client code (in practice, we do not and probably cannot enforce this). Header
files that we do ship with GHC are in the includes
C-- code for parts of the runtime that are part of the Haskell execution environment: for
example, the implementation of primitives, exceptions, and so on. A .cmm file is
pseudo C--: more or less C-- syntax with some omissions and some additional macro-like
extensions implemented by GHC. The .cmm files are compiled using GHC itself: see
Subdirectories of rts/
POSIX and Win32-specific parts of the runtime respectively. We try to put platform-specific stuff in these directories,
however not all of the RTS follows this convention right now.
The eval/apply machinery. Note: AutoApply.cmm is the family
of functions for performing generic application of unknown
functions, this code depends on the number of registers available
for argument passing, so it is generated automatically by the program
genapply in utils/genapply.