1 /* -----------------------------------------------------------------------------
2 * $Id: Stg.h,v 1.4 1999/01/21 10:31:43 simonm Exp $
4 * Top-level include file for everything STG-ish.
6 * This file is included *automatically* by all .hc files.
8 * ---------------------------------------------------------------------------*/
13 #ifndef NON_POSIX_SOURCE
19 #ifdef __HUGS__ /* vile hack till the GHC folks come on board */
23 /* ToDo: Set this flag properly: COMPILER and INTERPRETER should not be mutually exclusive. */
28 /* Global type definitions*/
31 /* Global constaints */
32 #include "Constants.h"
34 /* Profiling information */
35 #include "Profiling.h"
37 /* Storage format definitions */
39 #include "InfoTables.h"
42 /* STG/Optimised-C related stuff */
45 #include "TailCalls.h"
48 * Added by Ian McDonald 7/5/98
49 * XXX The position of this code is very
50 * important - it must come after the
53 #ifdef nemesis_TARGET_OS
61 /* these are all ANSI C headers */
80 /* Wired-in Prelude identifiers */
84 #include "StgStorage.h"
86 /* Macros for STG/C code */
87 #include "ClosureMacros.h"
88 #include "InfoMacros.h"
89 #include "StgMacros.h"
96 /* Built-in entry points */
97 #include "StgMiscClosures.h"
99 /* Runtime-system hooks */
102 /* Misc stuff without a home */
103 extern char **prog_argv; /* so we can get at these from Haskell */
104 extern int prog_argc;
106 extern char **environ;
108 /* Creating and destroying an adjustor thunk.
109 I cannot make myself create a separate .h file
112 extern void* createAdjustor(int cconv, StgStablePtr hptr, StgFunPtr wptr);
113 extern void freeHaskellFunctionPtr(void* ptr);
115 /* -----------------------------------------------------------------------------
116 Assertions and Debuggery
117 -------------------------------------------------------------------------- */
120 #define ASSERT(predicate) /* nothing */
123 void _stgAssert (char *, unsigned int);
125 #define ASSERT(predicate) \
129 _stgAssert(__FILE__, __LINE__)