[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / includes / Stg.h
1 /* -----------------------------------------------------------------------------
2  * $Id: Stg.h,v 1.2 1998/12/02 13:21:33 simonm Exp $
3  *
4  * Top-level include file for everything STG-ish.  
5  *
6  * This file is included *automatically* by all .hc files.
7  *
8  * ---------------------------------------------------------------------------*/
9
10 #ifndef STG_H
11 #define STG_H
12
13 #ifndef NON_POSIX_SOURCE
14 #define _POSIX_SOURCE
15 #endif
16
17 /* Configuration */
18 #include "config.h"
19 #ifdef __HUGS__ /* vile hack till the GHC folks come on board */
20 #include "options.h"
21 #endif
22
23 /* ToDo: Set this flag properly: COMPILER and INTERPRETER should not be mutually exclusive. */
24 #ifndef INTERPRETER
25 #define COMPILER 1
26 #endif
27
28 /* Global type definitions*/
29 #include "StgTypes.h"
30
31 /* Global constaints */
32 #include "Constants.h"
33
34 /* Profiling information */
35 #include "Profiling.h"
36
37 /* Storage format definitions */
38 #include "Closures.h"
39 #include "InfoTables.h"
40 #include "TSO.h"
41
42 /* STG/Optimised-C related stuff */
43 #include "MachRegs.h"
44 #include "Regs.h"
45 #include "TailCalls.h"
46
47 /**
48  * Added by Ian McDonald 7/5/98 
49  * XXX The position of this code is very
50  * important - it must come after the 
51  * Regs.h include
52  **/
53 #ifdef nemesis_TARGET_OS
54 #define _NEMESIS_OS_
55 #ifndef __LANGUAGE_C
56 #define __LANGUAGE_C
57 #endif
58 #include <nemesis.h>
59 #endif
60
61 /* these are all ANSI C headers */
62 #include <stdlib.h>
63 #include <string.h>
64 #include <math.h>
65 #include <assert.h>
66 #include <errno.h>
67 #include <stdio.h>
68
69 #ifdef HAVE_SIGNAL_H
70 #include <signal.h>
71 #endif
72
73 #ifdef HAVE_UNISTD_H
74 #include <unistd.h>
75 #endif
76
77 /* GNU mp library */
78 #include "gmp.h"
79
80 /* Wired-in Prelude identifiers */
81 #include "Prelude.h"
82
83 /* Storage Manager */
84 #include "StgStorage.h"
85
86 /* Macros for STG/C code */
87 #include "ClosureMacros.h"
88 #include "InfoMacros.h"
89 #include "StgMacros.h"
90 #include "StgProf.h"
91 #include "PrimOps.h"
92 #include "Updates.h"
93 #include "Ticky.h"
94 #include "CCall.h"
95
96 /* Built-in entry points */
97 #include "StgMiscClosures.h"
98
99 /* Runtime-system hooks */
100 #include "Hooks.h"
101
102 /* Misc stuff without a home */
103 extern char **prog_argv;        /* so we can get at these from Haskell */
104 extern int    prog_argc;
105
106 extern char **environ;
107
108 #endif /* STG_H */