/* get types from GHC's runtime system */
#include "ghcconfig.h"
-#include "RtsConfig.h"
-#include "StgTypes.h"
+#include "stg/Types.h"
/* get limits for integral types */
#ifdef HAVE_STDINT_H
typedef StgWord64 HsWord64;
typedef StgFloat HsFloat;
typedef StgDouble HsDouble;
-typedef StgBool HsBool;
+typedef StgInt HsBool;
typedef void* HsPtr; /* this should better match StgAddr */
typedef void (*HsFunPtr)(void); /* this should better match StgAddr */
-typedef void* HsForeignPtr; /* ... and this StgForeignPtr */
typedef void* HsStablePtr;
-typedef void* HsAddr; /* DEPRECATED */
-typedef void* HsForeignObj; /* DEPRECATED */
/* this should correspond to the type of StgChar in StgTypes.h */
#define HS_CHAR_MIN 0
#if SIZEOF_VOID_P == 8
#define HS_INT_MIN __INT64_MIN
#define HS_INT_MAX __INT64_MAX
+#define HS_WORD_MAX __UINT64_MAX
#elif SIZEOF_VOID_P == 4
#define HS_INT_MIN __INT32_MIN
#define HS_INT_MAX __INT32_MAX
+#define HS_WORD_MAX __UINT32_MAX
#else
#error GHC untested on this architecture: sizeof(void *) != 4 or 8
#endif