1 /* -----------------------------------------------------------------------------
2 * $Id: Stg.h,v 1.11 1999/05/10 08:23:57 sof Exp $
4 * (c) The GHC Team, 1998-1999
6 * Top-level include file for everything STG-ish.
8 * This file is included *automatically* by all .hc files.
10 * ---------------------------------------------------------------------------*/
15 #ifndef NON_POSIX_SOURCE
21 #ifdef __HUGS__ /* vile hack till the GHC folks come on board */
25 /* Some macros to handle DLLing (Win32 only at the moment). */
28 /* ToDo: Set this flag properly: COMPILER and INTERPRETER should not be mutually exclusive. */
35 #define BITS_PER_BYTE 8
36 #define BITS_IN(x) (BITS_PER_BYTE * sizeof(x))
38 /* -----------------------------------------------------------------------------
39 Assertions and Debuggery
40 -------------------------------------------------------------------------- */
43 #define ASSERT(predicate) /* nothing */
46 void _stgAssert (char *, unsigned int);
48 #define ASSERT(predicate) \
52 _stgAssert(__FILE__, __LINE__)
55 /* -----------------------------------------------------------------------------
56 Include everything STG-ish
57 -------------------------------------------------------------------------- */
59 /* Global type definitions*/
62 /* Global constaints */
63 #include "Constants.h"
65 /* Profiling information */
66 #include "Profiling.h"
68 /* Storage format definitions */
70 #include "ClosureTypes.h"
71 #include "InfoTables.h"
74 /* STG/Optimised-C related stuff */
77 #include "TailCalls.h"
79 /* these are all ANSI C headers */
98 /* Wired-in Prelude identifiers */
101 /* Storage Manager */
102 #include "StgStorage.h"
104 /* Macros for STG/C code */
105 #include "ClosureMacros.h"
106 #include "InfoMacros.h"
107 #include "StgMacros.h"
111 #include "StgTicky.h"
115 /* Built-in entry points */
116 #include "StgMiscClosures.h"
118 /* Runtime-system hooks */
121 /* Misc stuff without a home */
122 #if defined(ENABLE_WIN32_DLL_SUPPOT) && !defined(COMPILING_RTS)
123 extern DLLIMPORT char **prog_argv; /* so we can get at these from Haskell */
124 extern DLLIMPORT int prog_argc;
126 extern char **prog_argv; /* so we can get at these from Haskell */
127 extern int prog_argc;
130 extern char **environ;
132 /* Creating and destroying an adjustor thunk.
133 I cannot make myself create a separate .h file
137 extern void* createAdjustor(int cconv, StgStablePtr hptr, StgFunPtr wptr);
138 extern void freeHaskellFunctionPtr(void* ptr);