* included in the distribution.
*
* $RCSfile: connect.h,v $
- * $Revision: 1.33 $
- * $Date: 2000/03/24 14:32:03 $
+ * $Revision: 1.41 $
+ * $Date: 2000/05/10 09:00:20 $
* ------------------------------------------------------------------------*/
/* --------------------------------------------------------------------------
* Texts, Names, Instances, Classes, Types, Kinds and Modules
* ------------------------------------------------------------------------*/
+extern Text textPrelPrim;
extern Text textPrelude;
extern Text textNum; /* used to process default decls */
extern Text textCcall; /* used to process foreign import */
extern Type typeIO;
extern Type typeException;
-
+extern Module modulePrelPrim;
extern Module modulePrelude;
-
extern Kind starToStar; /* Type -> Type */
extern Float whnfFloat; /* float value of term in whnf */
extern Long numCells; /* number of cells allocated */
extern Int numGcs; /* number of garbage collections */
+extern int numEnters; /* number of enters */
extern Bool preludeLoaded; /* TRUE => prelude has been loaded */
extern Bool flagAssert; /* TRUE => assert False <e> causes
an assertion failure */
extern Int diNum; /* also for deriving */
extern List cfunSfuns; /* List of (Cfun,[SelectorVar]) */
+extern Module moduleBeingParsed; /* so the parser (topModule) knows */
+
+
#if USE_PREPROCESSOR
extern String preprocessor; /* preprocessor command */
#endif
extern Int outColumn; /* current output column number */
-
-/*---------------------------------------------------------------------------
- * Crude profiling (probably doesn't work)
- *-------------------------------------------------------------------------*/
-
-#ifdef CRUDE_PROFILING
-extern void cp_init ( void );
-extern void cp_enter ( Cell /*StgVar*/ );
-extern void cp_bill_words ( int );
-extern void cp_bill_insns ( int );
-extern void cp_show ( void );
-#endif
-
-
/*---------------------------------------------------------------------------
* For dynamic.c and general object-related stuff
*-------------------------------------------------------------------------*/
* Environment variables and the registry
*-------------------------------------------------------------------------*/
-/* On Win32 we can use the registry to supplement info in environment
- * variables.
- */
-/* AJG: Commented out for now for development */
-/* #define USE_REGISTRY (HAVE_WINDOWS_H && !__MSDOS__) */
-
-#ifdef USE_REGISTRY
-Bool writeRegString ( String var, String val );
-String readRegString ( String var, String def );
-Int readRegInt ( String var, Int def );
-Bool writeRegInt ( String var, Int val );
-#endif
-
#define N_INSTALLDIR 200
extern char installDir[N_INSTALLDIR];
# define filenamecmp(s1,s2) strcmp(s1,s2)
#endif
+#define HI_ENDING ".u_hi"
+
/*---------------------------------------------------------------------------
* Pipe-related operations:
* Freevar analysis: list of free vars after
* Lambda lifting: freevar list or UNIT on input, discarded after
* Code generation: unused
- * Optimisation: number of uses (sort-of) of let-bound variable
* ------------------------------------------------------------------------*/
typedef Cell StgRhs;
extern Name implementRecEq ( Text );
#endif
-/* Association list storing globals assigned to dictionaries, tuples, etc */
-extern List stgGlobals;
-
-extern List liftBinds ( List binds );
+extern void liftModule ( Module );
extern StgExpr substExpr ( List sub, StgExpr e );
extern List freeVarsBind ( List, StgVar );
-extern Void cgBinds ( StgRhs );
-extern void* closureOfVar ( StgVar );
+extern Void cgModule ( Module );
extern char* lookupHugsName ( void* );