From f88ac43f881583ec611edeafbb9e68419ba7ef4b Mon Sep 17 00:00:00 2001 From: sewardj Date: Mon, 13 Mar 2000 11:37:17 +0000 Subject: [PATCH] [project @ 2000-03-13 11:37:16 by sewardj] Further cleanups of connect.h. Also, zap the Args macro. We really don't need to support K&R C any more. --- ghc/interpreter/compiler.c | 92 +++---- ghc/interpreter/connect.h | 637 +++++++++++++++++++++---------------------- ghc/interpreter/derive.c | 56 ++-- ghc/interpreter/errors.h | 30 +- ghc/interpreter/free.c | 14 +- ghc/interpreter/hugs.c | 110 ++++---- ghc/interpreter/input.c | 88 +++--- ghc/interpreter/interface.c | 66 +++-- ghc/interpreter/link.c | 10 +- ghc/interpreter/machdep.c | 51 ++-- ghc/interpreter/output.c | 55 ++-- ghc/interpreter/parser.y | 28 +- ghc/interpreter/preds.c | 64 ++--- ghc/interpreter/prelude.h | 34 +-- ghc/interpreter/scc.c | 15 +- ghc/interpreter/static.c | 310 ++++++++++----------- ghc/interpreter/stg.c | 25 +- ghc/interpreter/storage.c | 45 ++- ghc/interpreter/storage.h | 253 ++++++++--------- ghc/interpreter/subst.c | 56 ++-- ghc/interpreter/translate.c | 18 +- ghc/interpreter/type.c | 132 ++++----- 22 files changed, 1081 insertions(+), 1108 deletions(-) diff --git a/ghc/interpreter/compiler.c b/ghc/interpreter/compiler.c index 1137c68..5260f20 100644 --- a/ghc/interpreter/compiler.c +++ b/ghc/interpreter/compiler.c @@ -11,8 +11,8 @@ * included in the distribution. * * $RCSfile: compiler.c,v $ - * $Revision: 1.21 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.22 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -29,52 +29,52 @@ * Local function prototypes: * ------------------------------------------------------------------------*/ -static Cell local translate Args((Cell)); -static Void local transPair Args((Pair)); -static Void local transTriple Args((Triple)); -static Void local transAlt Args((Cell)); -static Void local transCase Args((Cell)); -static List local transBinds Args((List)); -static Cell local transRhs Args((Cell)); -static Cell local mkConsList Args((List)); -static Cell local expandLetrec Args((Cell)); -static Cell local transComp Args((Cell,List,Cell)); -static Cell local transDo Args((Cell,Cell,List)); -static Cell local transConFlds Args((Cell,List)); -static Cell local transUpdFlds Args((Cell,List,List)); - -static Cell local refutePat Args((Cell)); -static Cell local refutePatAp Args((Cell)); -static Cell local matchPat Args((Cell)); -static List local remPat Args((Cell,Cell,List)); -static List local remPat1 Args((Cell,Cell,List)); - -static Cell local pmcTerm Args((Int,List,Cell)); -static Cell local pmcPair Args((Int,List,Pair)); -static Cell local pmcTriple Args((Int,List,Triple)); -static Cell local pmcVar Args((List,Text)); -static Void local pmcLetrec Args((Int,List,Pair)); -static Cell local pmcVarDef Args((Int,List,List)); -static Void local pmcFunDef Args((Int,List,Triple)); -static List local altsMatch Args((Int,Int,List,List)); -static Cell local match Args((Int,List)); -static Cell local joinMas Args((Int,List)); -static Bool local canFail Args((Cell)); -static List local addConTable Args((Cell,Cell,List)); -static Void local advance Args((Int,Int,Cell)); -static Bool local emptyMatch Args((Cell)); -static Cell local maDiscr Args((Cell)); -static Bool local isNumDiscr Args((Cell)); -static Bool local eqNumDiscr Args((Cell,Cell)); +static Cell local translate ( Cell ); +static Void local transPair ( Pair ); +static Void local transTriple ( Triple ); +static Void local transAlt ( Cell ); +static Void local transCase ( Cell ); +static List local transBinds ( List ); +static Cell local transRhs ( Cell ); +static Cell local mkConsList ( List ); +static Cell local expandLetrec ( Cell ); +static Cell local transComp ( Cell,List,Cell ); +static Cell local transDo ( Cell,Cell,List ); +static Cell local transConFlds ( Cell,List ); +static Cell local transUpdFlds ( Cell,List,List ); + +static Cell local refutePat ( Cell ); +static Cell local refutePatAp ( Cell ); +static Cell local matchPat ( Cell ); +static List local remPat ( Cell,Cell,List ); +static List local remPat1 ( Cell,Cell,List ); + +static Cell local pmcTerm ( Int,List,Cell ); +static Cell local pmcPair ( Int,List,Pair ); +static Cell local pmcTriple ( Int,List,Triple ); +static Cell local pmcVar ( List,Text ); +static Void local pmcLetrec ( Int,List,Pair ); +static Cell local pmcVarDef ( Int,List,List ); +static Void local pmcFunDef ( Int,List,Triple ); +static List local altsMatch ( Int,Int,List,List ); +static Cell local match ( Int,List ); +static Cell local joinMas ( Int,List ); +static Bool local canFail ( Cell ); +static List local addConTable ( Cell,Cell,List ); +static Void local advance ( Int,Int,Cell ); +static Bool local emptyMatch ( Cell ); +static Cell local maDiscr ( Cell ); +static Bool local isNumDiscr ( Cell ); +static Bool local eqNumDiscr ( Cell,Cell ); #if TREX -static Bool local isExtDiscr Args((Cell)); -static Bool local eqExtDiscr Args((Cell,Cell)); +static Bool local isExtDiscr ( Cell ); +static Bool local eqExtDiscr ( Cell,Cell ); #endif -static Void local compileGlobalFunction Args((Pair)); -static Void local compileGenFunction Args((Name)); -static Name local compileSelFunction Args((Pair)); -static List local addStgVar Args((List,Pair)); +static Void local compileGlobalFunction ( Pair ); +static Void local compileGenFunction ( Name ); +static Name local compileSelFunction ( Pair ); +static List local addStgVar ( List,Pair ); static Name currentName; /* Top level name being processed */ @@ -1448,7 +1448,7 @@ void eval_ctrlbrk ( int dunnowhat ) signal(SIGINT, eval_ctrlbrk); } -Void evalExp() { /* compile and run input expression */ +Void evalExp ( void ) { /* compile and run input expression */ /* ToDo: this name (and other names generated during pattern match?) * get inserted in the symbol table but never get removed. */ diff --git a/ghc/interpreter/connect.h b/ghc/interpreter/connect.h index 1e83391..7f332dd 100644 --- a/ghc/interpreter/connect.h +++ b/ghc/interpreter/connect.h @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: connect.h,v $ - * $Revision: 1.27 $ - * $Date: 2000/03/10 19:50:45 $ + * $Revision: 1.28 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ /* -------------------------------------------------------------------------- @@ -209,14 +209,10 @@ extern Type typeIO; extern Type typeException; - extern Module modulePrelude; -extern Kind starToStar; /* Type -> Type */ - - - +extern Kind starToStar; /* Type -> Type */ #if TREX @@ -248,17 +244,16 @@ extern Cell predFractional; /* Fractional (mkOffset(0)) */ extern Cell predIntegral; /* Integral (mkOffset(0)) */ extern Cell predMonad; /* Monad (mkOffset(0)) */ - extern Type arrow; /* mkOffset(0) -> mkOffset(1) */ -extern Type boundPair;; /* (mkOffset(0),mkOffset(0)) */ -extern Type listof;; /* [ mkOffset(0) ] */ -extern Type typeVarToVar;; /* mkOffset(0) -> mkOffset(0) */ +extern Type boundPair; /* (mkOffset(0),mkOffset(0)) */ +extern Type listof; /* [ mkOffset(0) ] */ +extern Type typeVarToVar; /* mkOffset(0) -> mkOffset(0) */ -extern Cell predNum;; /* Num (mkOffset(0)) */ -extern Cell predFractional;; /* Fractional (mkOffset(0)) */ -extern Cell predIntegral;; /* Integral (mkOffset(0)) */ -extern Kind starToStar;; /* Type -> Type */ -extern Cell predMonad;; /* Monad (mkOffset(0)) */ +extern Cell predNum; /* Num (mkOffset(0)) */ +extern Cell predFractional; /* Fractional (mkOffset(0)) */ +extern Cell predIntegral; /* Integral (mkOffset(0)) */ +extern Kind starToStar; /* Type -> Type */ +extern Cell predMonad; /* Monad (mkOffset(0)) */ #define fn(from,to) ap(ap(typeArrow,from),to) /* make type: from -> to */ @@ -271,53 +266,53 @@ extern Type boundPair; /* (mkOffset(0),mkOffset(0)) */ * Umm .... * ------------------------------------------------------------------------*/ -extern Bool haskell98; /* TRUE => Haskell 98 compatibility*/ -extern Bool combined; /* TRUE => combined operation */ -extern Bool debugSC; /* TRUE => print SC to screen */ -extern Bool kindExpert; /* TRUE => display kind errors in */ +extern Bool haskell98; /* TRUE => Haskell 98 compatibility*/ +extern Bool combined; /* TRUE => combined operation */ +extern Bool debugSC; /* TRUE => print SC to screen */ +extern Bool kindExpert; /* TRUE => display kind errors in */ /* full detail */ -extern Bool allowOverlap; /* TRUE => allow overlapping insts */ +extern Bool allowOverlap; /* TRUE => allow overlapping insts */ extern String repeatStr; /* Repeat last command string */ extern String hugsEdit; /* String for editor command */ extern String hugsPath; /* String for file search path */ extern String projectPath; /* String for project search path */ -extern Cell *CStackBase; /* pointer to base of C stack */ - -extern List tyconDefns; /* list of type constructor defns */ -extern List typeInDefns; /* list of synonym restrictions */ -extern List valDefns; /* list of value definitions */ -extern List classDefns; /* list of class definitions */ -extern List instDefns; /* list of instance definitions */ -extern List selDefns; /* list of selector lists */ -extern List genDefns; /* list of generated defns */ -extern List primDefns; /* list of primitive definitions */ -extern List unqualImports; /* unqualified import list */ -extern List defaultDefns; /* default definitions (if any) */ -extern Int defaultLine; /* line in which default defs occur*/ -extern List evalDefaults; /* defaults for evaluator */ -extern Cell inputExpr; /* evaluator input expression */ -extern Cell inputContext; /* evaluator input expression */ - -extern Cell whnfHead; /* head of term in whnf */ -extern Int whnfInt; /* integer value of term in whnf */ -extern Float whnfFloat; /* float value of term in whnf */ -extern Long numCells; /* number of cells allocated */ -extern Int numGcs; /* number of garbage collections */ -extern Bool broken; /* indicates interrupt received */ -extern Bool preludeLoaded; /* TRUE => prelude has been loaded */ - -extern Bool gcMessages; /* TRUE => print GC messages */ -extern Bool literateScripts; /* TRUE => default lit scripts */ -extern Bool literateErrors; /* TRUE => report errs in lit scrs */ -extern Bool showInstRes; /*TRUE => show instance resolution */ - -extern Int cutoff; /* Constraint Cutoff depth */ - -extern List diVars; /* deriving: cache of names */ -extern Int diNum; /* also for deriving */ -extern List cfunSfuns; /* List of (Cfun,[SelectorVar]) */ +extern Cell* CStackBase; /* pointer to base of C stack */ + +extern List tyconDefns; /* list of type constructor defns */ +extern List typeInDefns; /* list of synonym restrictions */ +extern List valDefns; /* list of value definitions */ +extern List classDefns; /* list of class definitions */ +extern List instDefns; /* list of instance definitions */ +extern List selDefns; /* list of selector lists */ +extern List genDefns; /* list of generated defns */ +extern List primDefns; /* list of primitive definitions */ +extern List unqualImports; /* unqualified import list */ +extern List defaultDefns; /* default definitions (if any) */ +extern Int defaultLine; /* line in which default defs occur*/ +extern List evalDefaults; /* defaults for evaluator */ +extern Cell inputExpr; /* evaluator input expression */ +extern Cell inputContext; /* evaluator input expression */ + +extern Cell whnfHead; /* head of term in whnf */ +extern Int whnfInt; /* integer value of term in whnf */ +extern Float whnfFloat; /* float value of term in whnf */ +extern Long numCells; /* number of cells allocated */ +extern Int numGcs; /* number of garbage collections */ +extern Bool broken; /* indicates interrupt received */ +extern Bool preludeLoaded; /* TRUE => prelude has been loaded */ + +extern Bool gcMessages; /* TRUE => print GC messages */ +extern Bool literateScripts; /* TRUE => default lit scripts */ +extern Bool literateErrors; /* TRUE => report errs in lit scrs */ +extern Bool showInstRes; /*TRUE => show instance resolution */ + +extern Int cutoff; /* Constraint Cutoff depth */ + +extern List diVars; /* deriving: cache of names */ +extern Int diNum; /* also for deriving */ +extern List cfunSfuns; /* List of (Cfun,[SelectorVar]) */ #if USE_PREPROCESSOR extern String preprocessor; /* preprocessor command */ @@ -341,143 +336,146 @@ extern String preprocessor; /* preprocessor command */ /* PREPREL was formerly called INSTALL. POSTPREL doesn't have an analogy in the old Hugs. */ -extern Void everybody Args((Int)); -extern Void linkControl Args((Int)); -extern Void deriveControl Args((Int)); -extern Void translateControl Args((Int)); -extern Void codegen Args((Int)); -extern Void machdep Args((Int)); -extern Void liftControl ( Int what ); -extern Void substitution Args((Int)); -extern Void typeChecker Args((Int)); -extern Void interface Args((Int)); +extern Void everybody ( Int ); +extern Void linkControl ( Int ); +extern Void deriveControl ( Int ); +extern Void translateControl ( Int ); +extern Void codegen ( Int ); +extern Void machdep ( Int ); +extern Void liftControl ( Int ); +extern Void substitution ( Int ); +extern Void typeChecker ( Int ); +extern Void interface ( Int ); +extern Void storage ( Int ); typedef long Target; -extern Void setGoal Args((String, Target)); -extern Void soFar Args((Target)); -extern Void done Args((Void)); -extern String fromEnv Args((String,String)); -extern Bool chase Args((List)); - -extern Void storage Args((Int)); - -extern Void input Args((Int)); -extern Void consoleInput Args((String)); -extern Void projInput Args((String)); -extern Void stringInput Args((String)); -extern Void parseScript Args((String,Long)); -extern Void parseExp Args((Void)); +extern Void setGoal ( String, Target ); +extern Void soFar ( Target ); +extern Void done ( Void ); +extern String fromEnv ( String,String ); +extern Bool chase ( List ); + +extern Void input ( Int ); +extern Void consoleInput ( String ); +extern Void projInput ( String ); +extern Void stringInput ( String ); +extern Void parseScript ( String,Long ); +extern Void parseExp ( Void ); #if EXPLAIN_INSTANCE_RESOLUTION -extern Void parseContext Args((Void)); +extern Void parseContext ( Void ); #endif -extern String readFilename Args((Void)); -extern String readLine Args((Void)); -extern Syntax defaultSyntax Args((Text)); -extern Syntax syntaxOf Args((Name)); -extern String unlexChar Args((Char,Char)); -extern Void printString Args((String)); - - -extern Void staticAnalysis Args((Int)); -extern Void startModule Args((Cell)); -extern Void setExportList Args((List)); -extern Void setExports Args((List)); -extern Void addQualImport Args((Text,Text)); -extern Void addUnqualImport Args((Text,List)); - -extern Void tyconDefn Args((Int,Cell,Cell,Cell)); -extern Void setTypeIns Args((List)); -extern Void clearTypeIns Args((Void)); -extern Type fullExpand Args((Type)); -extern Bool isAmbiguous Args((Type)); -extern Void ambigError Args((Int,String,Cell,Type)); -extern Void classDefn Args((Int,Cell,List,List)); -extern Void instDefn Args((Int,Cell,Cell)); -extern Void addTupInst Args((Class,Int)); -extern Name newDSel Args((Class,Int)); +extern String readFilename ( Void ); +extern String readLine ( Void ); +extern Syntax defaultSyntax ( Text ); +extern Syntax syntaxOf ( Name ); +extern String unlexChar ( Char,Char ); +extern Void printString ( String ); + + +extern Void staticAnalysis ( Int ); +extern Void startModule ( Cell ); +extern Void setExportList ( List ); +extern Void setExports ( List ); +extern Void addQualImport ( Text,Text ); +extern Void addUnqualImport ( Text,List ); + +extern Void tyconDefn ( Int,Cell,Cell,Cell ); +extern Void setTypeIns ( List ); +extern Void clearTypeIns ( Void ); +extern Type fullExpand ( Type ); +extern Bool isAmbiguous ( Type ); +extern Void ambigError ( Int,String,Cell,Type ); +extern Void classDefn ( Int,Cell,List,List ); +extern Void instDefn ( Int,Cell,Cell ); +extern Void addTupInst ( Class,Int ); +extern Name newDSel ( Class,Int ); #if TREX -extern Inst addRecShowInst Args((Class,Ext)); -extern Inst addRecEqInst Args((Class,Ext)); +extern Inst addRecShowInst ( Class,Ext ); +extern Inst addRecEqInst ( Class,Ext ); #endif -extern List offsetTyvarsIn Args((Type,List)); +extern List offsetTyvarsIn ( Type,List ); -extern List typeVarsIn Args((Cell,List,List,List)); -extern List oclose Args((List,List)); -extern List zonkTyvarsIn Args((Type,List)); -extern Type zonkTyvar Args((Int)); -extern Type zonkType Args((Type,Int)); -extern Void primDefn Args((Cell,List,Cell)); -extern Void defaultDefn Args((Int,List)); -extern Void checkExp Args((Void)); -extern Type conToTagType Args((Tycon)); -extern Type tagToConType Args((Tycon)); -extern Int visitClass Args((Class)); +extern List typeVarsIn ( Cell,List,List,List ); +extern List oclose ( List,List ); +extern List zonkTyvarsIn ( Type,List ); +extern Type zonkTyvar ( Int ); +extern Type zonkType ( Type,Int ); +extern Void primDefn ( Cell,List,Cell ); +extern Void defaultDefn ( Int,List ); +extern Void checkExp ( Void ); +extern Type conToTagType ( Tycon ); +extern Type tagToConType ( Tycon ); +extern Int visitClass ( Class ); #if EXPLAIN_INSTANCE_RESOLUTION -extern Void checkContext Args((Void)); +extern Void checkContext ( Void ); #endif -extern Void checkDefns Args((Void)); -extern Bool h98Pred Args((Bool,Cell)); -extern Cell h98Context Args((Bool,List)); -extern Void h98CheckCtxt Args((Int,String,Bool,List,Inst)); -extern Void h98CheckType Args((Int,String,Cell,Type)); -extern Void h98DoesntSupport Args((Int,String)); - -extern Int userArity Args((Name)); -extern List deriveEq Args((Tycon)); -extern List deriveOrd Args((Tycon)); -extern List deriveEnum Args((Tycon)); -extern List deriveIx Args((Tycon)); -extern List deriveShow Args((Tycon)); -extern List deriveRead Args((Cell)); -extern List deriveBounded Args((Tycon)); -extern List checkPrimDefn Args((Triple)); - -extern Void foreignImport Args((Cell,Text,Pair,Cell,Cell)); -extern List foreignImports; /* foreign import declarations */ -extern Void implementForeignImport Args((Name)); -extern Void foreignExport Args((Cell,Text,Cell,Cell,Cell)); +extern Void checkDefns ( Void ); +extern Bool h98Pred ( Bool,Cell ); +extern Cell h98Context ( Bool,List ); +extern Void h98CheckCtxt ( Int,String,Bool,List,Inst ); +extern Void h98CheckType ( Int,String,Cell,Type ); +extern Void h98DoesntSupport ( Int,String ); + +extern Int userArity ( Name ); +extern List deriveEq ( Tycon ); +extern List deriveOrd ( Tycon ); +extern List deriveEnum ( Tycon ); +extern List deriveIx ( Tycon ); +extern List deriveShow ( Tycon ); +extern List deriveRead ( Cell ); +extern List deriveBounded ( Tycon ); +extern List checkPrimDefn ( Triple ); + +extern Void foreignImport ( Cell,Text,Pair,Cell,Cell ); +extern Void foreignExport ( Cell,Text,Cell,Cell,Cell ); + +extern Void implementForeignImport ( Name ); +extern Void implementForeignExport ( Name ); + extern List foreignExports; /* foreign export declarations */ -extern Void implementForeignExport Args((Name)); - -extern Type primType( Int /*AsmMonad*/ monad, String a_kinds, String r_kinds ); - -extern Type typeCheckExp Args((Bool)); -extern Void typeCheckDefns Args((Void)); -extern Cell provePred Args((Kinds,List,Cell)); -extern List simpleContext Args((List,Int)); -extern Cell rhsExpr Args((Cell)); -extern Int rhsLine Args((Cell)); -extern Bool isProgType Args((List,Type)); -extern Cell superEvid Args((Cell,Class,Class)); -extern Void linkPreludeTC Args((Void)); -extern Void linkPreludeCM Args((Void)); -extern Void linkPrimitiveNames(void); - -extern Void compiler Args((Int)); -extern Void compileDefns Args((Void)); -extern Void compileExp Args((Void)); -extern Bool failFree Args((Cell)); -extern Int discrArity Args((Cell)); - -extern Addr codeGen Args((Name,Int,Cell)); -extern Int shellEsc Args((String)); -extern Int getTerminalWidth Args((Void)); -extern Void normalTerminal Args((Void)); -extern Void noechoTerminal Args((Void)); -extern Int readTerminalChar Args((Void)); -extern Void gcStarted Args((Void)); -extern Void gcScanning Args((Void)); -extern Void gcRecovered Args((Int)); -extern Void gcCStack Args((Void)); -extern Void needPrims Args((Int)); -extern List calcFunDepsPreds Args((List)); -extern Inst findInstFor Args((Cell,Int)); +extern List foreignImports; /* foreign import declarations */ + +extern Type primType ( Int /*AsmMonad*/ monad, + String a_kinds, String r_kinds ); + +extern Type typeCheckExp ( Bool ); +extern Void typeCheckDefns ( Void ); +extern Cell provePred ( Kinds,List,Cell ); +extern List simpleContext ( List,Int ); +extern Cell rhsExpr ( Cell ); +extern Int rhsLine ( Cell ); +extern Bool isProgType ( List,Type ); +extern Cell superEvid ( Cell,Class,Class ); +extern Void linkPreludeTC ( Void ); +extern Void linkPreludeCM ( Void ); +extern Void linkPrimNames ( Void ); + +extern Void compiler ( Int ); +extern Void compileDefns ( Void ); +extern Void compileExp ( Void ); +extern Bool failFree ( Cell ); +extern Int discrArity ( Cell ); + +extern Addr codeGen ( Name,Int,Cell ); +extern Void evalExp ( Void ); +extern Int shellEsc ( String ); +extern Int getTerminalWidth ( Void ); +extern Void normalTerminal ( Void ); +extern Void noechoTerminal ( Void ); +extern Int readTerminalChar ( Void ); +extern Void gcStarted ( Void ); +extern Void gcScanning ( Void ); +extern Void gcRecovered ( Int ); +extern Void gcCStack ( Void ); +extern Void needPrims ( Int ); +extern List calcFunDepsPreds ( List ); +extern Inst findInstFor ( Cell,Int ); #if MULTI_INST -extern List findInstsFor Args((Cell,Int)); +extern List findInstsFor ( Cell,Int ); #endif @@ -485,30 +483,31 @@ extern List findInstsFor Args((Cell,Int)); * Debugging printers, and output-ery *-------------------------------------------------------------------------*/ -extern Void ppScripts ( Void ); -extern Void ppModules ( Void ); +extern Void ppScripts ( Void ); +extern Void ppModules ( Void ); -extern Void printStg( FILE *fp, Cell /*StgVar*/ b); +extern Void printStg ( FILE *fp, Cell /*StgVar*/ b); -extern Void ppStg ( Cell /*StgVar*/ v ); -extern Void ppStgExpr ( Cell /*StgExpr*/ e ); -extern Void ppStgRhs ( Cell /*StgRhs*/ rhs ); -extern Void ppStgAlts ( List alts ); -extern Void ppStgPrimAlts( List alts ); -extern Void ppStgVars ( List vs ); - -extern Void putChr Args((Int)); -extern Void putStr Args((String)); -extern Void putInt Args((Int)); -extern Void putPtr Args((Ptr)); - -extern Void unlexCharConst Args((Cell)); +extern Void ppStg ( Cell /*StgVar*/ v ); +extern Void ppStgExpr ( Cell /*StgExpr*/ e ); +extern Void ppStgRhs ( Cell /*StgRhs*/ rhs ); +extern Void ppStgAlts ( List alts ); +extern Void ppStgPrimAlts ( List alts ); +extern Void ppStgVars ( List vs ); + +extern Void putChr ( Int ); +extern Void putStr ( String ); +extern Void putInt ( Int ); +extern Void putPtr ( Ptr ); + +extern Void unlexCharConst ( Cell ); +extern Void unlexStrConst ( Text ); +extern Void unlexVar ( Text ); +extern Void unlexVarStr ( String ); + extern FILE *outputStream; /* current output stream */ extern Int outColumn; /* current output column number */ -extern Void unlexStrConst Args((Text)); -extern Void unlexVar Args((Text)); -extern Void unlexVarStr Args((String)); /*--------------------------------------------------------------------------- @@ -516,11 +515,11 @@ extern Void unlexVarStr Args((String)); *-------------------------------------------------------------------------*/ #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 ); +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 @@ -528,8 +527,8 @@ extern void cp_show ( void ); * For dynamic.c and general object-related stuff *-------------------------------------------------------------------------*/ -extern void* getDLLSymbol Args((Int,String,String)); -extern Bool stdcallAllowed Args((void)); +extern void* getDLLSymbol ( Int,String,String ); +extern Bool stdcallAllowed ( void ); #if LEADING_UNDERSCORE #define MAYBE_LEADING_UNDERSCORE(sss) _##sss @@ -544,7 +543,7 @@ extern Bool stdcallAllowed Args((void)); * Interrupting execution (signals, allowBreak): *-------------------------------------------------------------------------*/ -extern Bool breakOn Args((Bool)); +extern Bool breakOn ( Bool ); extern Bool broken; /* indicates interrupt received */ #ifndef SIGBREAK /* Sigh, not defined in cygwin32 beta release 16 */ @@ -593,10 +592,10 @@ extern int allow_break_count; /* #define USE_REGISTRY (HAVE_WINDOWS_H && !__MSDOS__) */ #ifdef USE_REGISTRY -Bool writeRegString Args((String var, String val)); -String readRegString Args((String var, String def)); -Int readRegInt Args((String var, Int def)); -Bool writeRegInt Args((String var, Int val)); +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 @@ -611,15 +610,15 @@ extern char installDir[N_INSTALLDIR]; # include # include #elif !HUGS_FOR_WINDOWS -extern int chdir Args((const char*)); +extern int chdir ( const char* ); #endif #if HAVE_STDLIB_H # include #else -extern int system Args((const char *)); -extern double atof Args((const char *)); -extern void exit Args((int)); +extern int system ( const char * ); +extern double atof ( const char * ); +extern void exit ( int ); #endif #ifndef FILENAME_MAX /* should already be defined in an ANSI compiler*/ @@ -681,33 +680,32 @@ extern void exit Args((int)); * Function prototypes for code in machdep.c *-------------------------------------------------------------------------*/ -extern String findMPathname Args((String,String,String)); -extern String findPathname Args((String,String)); - -extern Int shellEsc Args((String)); -extern Int getTerminalWidth Args((Void)); -extern Void normalTerminal Args((Void)); -extern Void noechoTerminal Args((Void)); -extern Int readTerminalChar Args((Void)); -extern Void gcStarted Args((Void)); -extern Void gcScanning Args((Void)); -extern Void gcRecovered Args((Int)); -extern Void gcCStack Args((Void)); +extern String findMPathname ( String,String,String ); +extern String findPathname ( String,String ); +extern Int shellEsc ( String ); +extern Int getTerminalWidth ( Void ); +extern Void normalTerminal ( Void ); +extern Void noechoTerminal ( Void ); +extern Int readTerminalChar ( Void ); +extern Void gcStarted ( Void ); +extern Void gcScanning ( Void ); +extern Void gcRecovered ( Int ); +extern Void gcCStack ( Void ); /*--------------------------------------------------------------------------- * To do with reading interface and object files *-------------------------------------------------------------------------*/ -extern Cell parseInterface Args((String,Long)); -extern ZPair readInterface Args((String,Long)); -extern Bool processInterfaces Args((Void)); - - -extern Void getFileSize Args((String, Long *)); - -extern void ifLinkConstrItbl ( Name n ); - +extern Cell parseInterface ( String,Long ); +extern ZPair readInterface ( String,Long ); +extern Bool processInterfaces ( Void ); +extern Void getFileSize ( String, Long * ); +extern Void ifLinkConstrItbl ( Name n ); +extern Void hi_o_namesFromSrcName ( String,String*,String* oName ); +extern String getExtraObjectInfo ( String primaryObjectName, + String extraFileName, + Int* extraFileSize ); extern List /* of ZTriple(I_INTERFACE, Text--name of obj file, @@ -715,13 +713,6 @@ extern List /* of ZTriple(I_INTERFACE, ifaces_outstanding; -extern Void hi_o_namesFromSrcName Args((String,String*,String* oName)); - -extern String getExtraObjectInfo ( String primaryObjectName, - String extraFileName, - Int* extraFileSize ); - - /* -------------------------------------------------------------------------- * Interpreter command structure * ------------------------------------------------------------------------*/ @@ -733,7 +724,7 @@ struct cmd { Command cmdCode; }; -extern Command readCommand Args((struct cmd *, Char, Char)); +extern Command readCommand ( struct cmd *, Char, Char ); #define EDIT 0 #define FIND 1 @@ -864,18 +855,18 @@ typedef Cell StgRep; /* PTR_REP | .. DOUBLE_REP */ * Utility functions for manipulating STG syntax trees. * ------------------------------------------------------------------------*/ -extern int stgConTag ( StgDiscr d ); -extern void* stgConInfo ( StgDiscr d ); -extern int stgDiscrTag( StgDiscr d ); +extern int stgConTag ( StgDiscr d ); +extern void* stgConInfo ( StgDiscr d ); +extern int stgDiscrTag ( StgDiscr d ); -extern List makeArgs ( Int ); -extern StgExpr makeStgLambda ( List args, StgExpr body ); -extern StgExpr makeStgApp ( StgVar fun, List args ); -extern StgExpr makeStgLet ( List binds, StgExpr body ); -extern StgExpr makeStgIf ( StgExpr cond, StgExpr e1, StgExpr e2 ); -extern Bool isStgVar ( StgRhs rhs ); -extern Bool isAtomic ( StgRhs rhs ); -extern StgVar mkStgVar ( StgRhs rhs, Cell info ); +extern List makeArgs ( Int ); +extern StgExpr makeStgLambda ( List args, StgExpr body ); +extern StgExpr makeStgApp ( StgVar fun, List args ); +extern StgExpr makeStgLet ( List binds, StgExpr body ); +extern StgExpr makeStgIf ( StgExpr cond, StgExpr e1, StgExpr e2 ); +extern Bool isStgVar ( StgRhs rhs ); +extern Bool isAtomic ( StgRhs rhs ); +extern StgVar mkStgVar ( StgRhs rhs, Cell info ); #define mkStgRep(c) mkChar(c) @@ -884,31 +875,31 @@ extern StgVar mkStgVar ( StgRhs rhs, Cell info ); * STG/backendish functions * ------------------------------------------------------------------------*/ -extern Void stgDefn Args(( Name n, Int arity, Cell e )); +extern Void stgDefn ( Name n, Int arity, Cell e ); -extern Void implementForeignImport Args((Name)); -extern Void implementForeignExport Args((Name)); -extern Void implementCfun Args((Name, List)); -extern Void implementConToTag Args((Tycon)); -extern Void implementTagToCon Args((Tycon)); -extern Void implementPrim Args((Name)); -extern Void implementTuple Args((Int)); +extern Void implementForeignImport ( Name ); +extern Void implementForeignExport ( Name ); +extern Void implementCfun ( Name, List ); +extern Void implementConToTag ( Tycon ); +extern Void implementTagToCon ( Tycon ); +extern Void implementPrim ( Name ); +extern Void implementTuple ( Int ); #if TREX -extern Name implementRecShw Args((Text)); -extern Name implementRecEq Args((Text)); +extern Name implementRecShw ( Text ); +extern Name implementRecEq ( Text ); #endif /* Association list storing globals assigned to dictionaries, tuples, etc */ extern List stgGlobals; -extern List liftBinds( List binds ); -extern StgExpr substExpr ( List sub, StgExpr e ); -extern List freeVarsBind Args((List, StgVar)); +extern List liftBinds ( List binds ); +extern StgExpr substExpr ( List sub, StgExpr e ); +extern List freeVarsBind ( List, StgVar ); -extern Void cgBinds Args((StgRhs)); -extern void* closureOfVar Args((StgVar)); -extern char* lookupHugsName Args((void*)); +extern Void cgBinds ( StgRhs ); +extern void* closureOfVar ( StgVar ); +extern char* lookupHugsName ( void* ); /* -------------------------------------------------------------------------- @@ -953,69 +944,69 @@ extern List btyvars; /* explicitly scoped type vars */ extern char *unifyFails; /* Unification error message */ -extern Void emptySubstitution Args((Void)); -extern Int newTyvars Args((Int)); +extern Void emptySubstitution ( Void ); +extern Int newTyvars ( Int ); #define newKindvars(n) newTyvars(n) -extern Int newKindedVars Args((Kind)); -extern Kind simpleKind Args((Int)); -extern Void instantiate Args((Type)); - -extern Pair findBtyvs Args((Text)); -extern Void markBtyvs Args((Void)); -extern Type localizeBtyvs Args((Type)); - -extern Tyvar *getTypeVar Args((Type,Int)); -extern Void tyvarType Args((Int)); -extern Void bindTv Args((Int,Type,Int)); -extern Cell getDerefHead Args((Type,Int)); -extern Void expandSyn Args((Tycon, Int, Type *, Int *)); - -extern Void clearMarks Args((Void)); -extern Void markAllVars Args((Void)); -extern Void resetGenerics Args((Void)); -extern Void markTyvar Args((Int)); -extern Void markType Args((Type,Int)); -extern Void markPred Args((Cell)); - -extern Type copyTyvar Args((Int)); -extern Type copyType Args((Type,Int)); -extern Cell copyPred Args((Cell,Int)); -extern Type dropRank2 Args((Type,Int,Int)); -extern Type dropRank1 Args((Type,Int,Int)); -extern Void liftRank2Args Args((List,Int,Int)); -extern Type liftRank2 Args((Type,Int,Int)); -extern Type liftRank1 Args((Type,Int,Int)); +extern Int newKindedVars ( Kind ); +extern Kind simpleKind ( Int ); +extern Void instantiate ( Type ); + +extern Pair findBtyvs ( Text ); +extern Void markBtyvs ( Void ); +extern Type localizeBtyvs ( Type ); + +extern Tyvar *getTypeVar ( Type,Int ); +extern Void tyvarType ( Int ); +extern Void bindTv ( Int,Type,Int ); +extern Cell getDerefHead ( Type,Int ); +extern Void expandSyn ( Tycon, Int, Type *, Int * ); + +extern Void clearMarks ( Void ); +extern Void markAllVars ( Void ); +extern Void resetGenerics ( Void ); +extern Void markTyvar ( Int ); +extern Void markType ( Type,Int ); +extern Void markPred ( Cell ); + +extern Type copyTyvar ( Int ); +extern Type copyType ( Type,Int ); +extern Cell copyPred ( Cell,Int ); +extern Type dropRank2 ( Type,Int,Int ); +extern Type dropRank1 ( Type,Int,Int ); +extern Void liftRank2Args ( List,Int,Int ); +extern Type liftRank2 ( Type,Int,Int ); +extern Type liftRank1 ( Type,Int,Int ); #ifdef DEBUG_TYPES -extern Type debugTyvar Args((Int)); -extern Type debugType Args((Type,Int)); +extern Type debugTyvar ( Int ); +extern Type debugType ( Type,Int ); #endif -extern Kind copyKindvar Args((Int)); -extern Kind copyKind Args((Kind,Int)); +extern Kind copyKindvar ( Int ); +extern Kind copyKind ( Kind,Int ); -extern Bool eqKind Args((Kind,Kind)); -extern Kind getKind Args((Cell,Int)); +extern Bool eqKind ( Kind,Kind ); +extern Kind getKind ( Cell,Int ); -extern List genvarTyvar Args((Int,List)); -extern List genvarType Args((Type,Int,List)); +extern List genvarTyvar ( Int,List ); +extern List genvarType ( Type,Int,List ); -extern Bool doesntOccurIn Args((Tyvar*,Type,Int)); -extern Bool unify Args((Type,Int,Type,Int)); -extern Bool kunify Args((Kind,Int,Kind,Int)); +extern Bool doesntOccurIn ( Tyvar*,Type,Int ); +extern Bool unify ( Type,Int,Type,Int ); +extern Bool kunify ( Kind,Int,Kind,Int ); -extern Void typeTuple Args((Cell)); -extern Void varKind Args((Int)); +extern Void typeTuple ( Cell ); +extern Void varKind ( Int ); -extern Bool samePred Args((Cell,Int,Cell,Int)); -extern Bool matchPred Args((Cell,Int,Cell,Int)); -extern Bool unifyPred Args((Cell,Int,Cell,Int)); -extern Inst findInstFor Args((Cell,Int)); +extern Bool samePred ( Cell,Int,Cell,Int ); +extern Bool matchPred ( Cell,Int,Cell,Int ); +extern Bool unifyPred ( Cell,Int,Cell,Int ); +extern Inst findInstFor ( Cell,Int ); -extern Void improve Args((Int,List,List)); -extern Void improve1 Args((Int,List,Cell,Int)); +extern Void improve ( Int,List,List ); +extern Void improve1 ( Int,List,Cell,Int ); -extern Bool sameSchemes Args((Type,Type)); -extern Bool sameType Args((Type,Int,Type,Int)); -extern Bool matchType Args((Type,Int,Type,Int)); -extern Bool typeMatches Args((Type,Type)); +extern Bool sameSchemes ( Type,Type ); +extern Bool sameType ( Type,Int,Type,Int ); +extern Bool matchType ( Type,Int,Type,Int ); +extern Bool typeMatches ( Type,Type ); /*-------------------------------------------------------------------------*/ diff --git a/ghc/interpreter/derive.c b/ghc/interpreter/derive.c index 25402f9..d3d8797 100644 --- a/ghc/interpreter/derive.c +++ b/ghc/interpreter/derive.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: derive.c,v $ - * $Revision: 1.12 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.13 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -25,25 +25,25 @@ List cfunSfuns; /* List of (Cfun,[SelectorVar]) */ * local function prototypes: * ------------------------------------------------------------------------*/ -static List local getDiVars Args((Int)); -static Cell local mkBind Args((String,List)); -static Cell local mkVarAlts Args((Int,Cell)); -static List local makeDPats2 Args((Cell,Int)); -static Bool local isEnumType Args((Tycon)); -static Pair local mkAltEq Args((Int,List)); -static Pair local mkAltOrd Args((Int,List)); -static Cell local prodRange Args((Int,List,Cell,Cell,Cell)); -static Cell local prodIndex Args((Int,List,Cell,Cell,Cell)); -static Cell local prodInRange Args((Int,List,Cell,Cell,Cell)); -static List local mkIxBinds Args((Int,Cell,Int)); -static Cell local mkAltShow Args((Int,Cell,Int)); -static Cell local showsPrecRhs Args((Cell,Cell,Int)); -static Cell local mkReadCon Args((Name,Cell,Cell)); -static Cell local mkReadPrefix Args((Cell)); -static Cell local mkReadInfix Args((Cell)); -static Cell local mkReadTuple Args((Cell)); -static Cell local mkReadRecord Args((Cell,List)); -static List local mkBndBinds Args((Int,Cell,Int)); +static List local getDiVars ( Int ); +static Cell local mkBind ( String,List ); +static Cell local mkVarAlts ( Int,Cell ); +static List local makeDPats2 ( Cell,Int ); +static Bool local isEnumType ( Tycon ); +static Pair local mkAltEq ( Int,List ); +static Pair local mkAltOrd ( Int,List ); +static Cell local prodRange ( Int,List,Cell,Cell,Cell ); +static Cell local prodIndex ( Int,List,Cell,Cell,Cell ); +static Cell local prodInRange ( Int,List,Cell,Cell,Cell ); +static List local mkIxBinds ( Int,Cell,Int ); +static Cell local mkAltShow ( Int,Cell,Int ); +static Cell local showsPrecRhs ( Cell,Cell,Int ); +static Cell local mkReadCon ( Name,Cell,Cell ); +static Cell local mkReadPrefix ( Cell ); +static Cell local mkReadInfix ( Cell ); +static Cell local mkReadTuple ( Cell ); +static Cell local mkReadRecord ( Cell,List ); +static List local mkBndBinds ( Int,Cell,Int ); /* -------------------------------------------------------------------------- @@ -128,7 +128,7 @@ Tycon t; { /* type (i.e. all constructors arity == 0) */ * constructors in the datatype definition. * ------------------------------------------------------------------------*/ -static Pair local mkAltEq Args((Int,List)); +static Pair local mkAltEq ( Int,List ); List deriveEq(t) /* generate binding for derived == */ Type t; { /* for some TUPLE or DATATYPE t */ @@ -168,7 +168,7 @@ List pats; { /* arguments */ } -static Pair local mkAltOrd Args((Int,List)); +static Pair local mkAltOrd ( Int,List ); List deriveOrd(t) /* make binding for derived compare*/ Type t; { /* for some TUPLE or DATATYPE t */ @@ -257,11 +257,11 @@ Tycon t; { } -static List local mkIxBindsEnum Args((Tycon)); -static List local mkIxBinds Args((Int,Cell,Int)); -static Cell local prodRange Args((Int,List,Cell,Cell,Cell)); -static Cell local prodIndex Args((Int,List,Cell,Cell,Cell)); -static Cell local prodInRange Args((Int,List,Cell,Cell,Cell)); +static List local mkIxBindsEnum ( Tycon ); +static List local mkIxBinds ( Int,Cell,Int ); +static Cell local prodRange ( Int,List,Cell,Cell,Cell ); +static Cell local prodIndex ( Int,List,Cell,Cell,Cell ); +static Cell local prodInRange ( Int,List,Cell,Cell,Cell ); List deriveIx(t) /* Construct definition of indexing */ Tycon t; { diff --git a/ghc/interpreter/errors.h b/ghc/interpreter/errors.h index b650c2d..8c4856b 100644 --- a/ghc/interpreter/errors.h +++ b/ghc/interpreter/errors.h @@ -9,12 +9,12 @@ * included in the distribution. * * $RCSfile: errors.h,v $ - * $Revision: 1.5 $ - * $Date: 1999/10/16 02:17:28 $ + * $Revision: 1.6 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ -extern Void internal Args((String)) HUGS_noreturn; -extern Void fatal Args((String)) HUGS_noreturn; +extern Void internal ( String) HUGS_noreturn; +extern Void fatal ( String) HUGS_noreturn; #if HUGS_FOR_WINDOWS #define Hilite() WinTextcolor(hWndText,RED); @@ -38,20 +38,20 @@ extern Void fatal Args((String)) HUGS_noreturn; #define ERRKINDS(ks) Hilite(); printKinds(errorStream,ks); Lolite() #define ERRFD(fd) Hilite(); printFD(errorStream,fd); Lolite() -extern Void errHead Args((Int)); /* in main.c */ -extern Void errFail Args((Void)) HUGS_noreturn; -extern Void errAbort Args((Void)); +extern Void errHead ( Int ); /* in main.c */ +extern Void errFail ( Void) HUGS_noreturn; +extern Void errAbort ( Void ); extern sigProto(breakHandler); -extern Bool breakOn Args((Bool)); /* in machdep.c */ +extern Bool breakOn ( Bool ); /* in machdep.c */ -extern Void printExp Args((FILE *,Cell)); /* in output.c */ -extern Void printType Args((FILE *,Cell)); -extern Void printContext Args((FILE *,List)); -extern Void printPred Args((FILE *,Cell)); -extern Void printKind Args((FILE *,Kind)); -extern Void printKinds Args((FILE *,Kinds)); -extern Void printFD Args((FILE *,Pair)); +extern Void printExp ( FILE *,Cell ); /* in output.c */ +extern Void printType ( FILE *,Cell ); +extern Void printContext ( FILE *,List ); +extern Void printPred ( FILE *,Cell ); +extern Void printKind ( FILE *,Kind ); +extern Void printKinds ( FILE *,Kinds ); +extern Void printFD ( FILE *,Pair ); /*-------------------------------------------------------------------------*/ diff --git a/ghc/interpreter/free.c b/ghc/interpreter/free.c index c31aab6..bee9195 100644 --- a/ghc/interpreter/free.c +++ b/ghc/interpreter/free.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: free.c,v $ - * $Revision: 1.9 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.10 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -23,11 +23,11 @@ * Local functions * ------------------------------------------------------------------------*/ -static List freeVarsAlt Args((List, StgCaseAlt)); -static List freeVarsPrimAlt Args((List, StgPrimAlt)); -static List freeVarsExpr Args((List, StgExpr)); -static List freeVarsAtom Args((List, StgAtom)); -static List freeVarsVar Args((List, StgVar)); +static List freeVarsAlt ( List, StgCaseAlt ); +static List freeVarsPrimAlt ( List, StgPrimAlt ); +static List freeVarsExpr ( List, StgExpr ); +static List freeVarsAtom ( List, StgAtom ); +static List freeVarsVar ( List, StgVar ); /* -------------------------------------------------------------------------- * Free variable analysis diff --git a/ghc/interpreter/hugs.c b/ghc/interpreter/hugs.c index 2e2af9f..d05cb51 100644 --- a/ghc/interpreter/hugs.c +++ b/ghc/interpreter/hugs.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: hugs.c,v $ - * $Revision: 1.41 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.42 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #include @@ -41,54 +41,54 @@ Bool multiInstRes = FALSE; * Local function prototypes: * ------------------------------------------------------------------------*/ -static Void local initialize Args((Int,String [])); -static Void local promptForInput Args((String)); -static Void local interpreter Args((Int,String [])); -static Void local menu Args((Void)); -static Void local guidance Args((Void)); -static Void local forHelp Args((Void)); -static Void local set Args((Void)); -static Void local changeDir Args((Void)); -static Void local load Args((Void)); -static Void local project Args((Void)); -static Void local readScripts Args((Int)); -static Void local whatScripts Args((Void)); -static Void local editor Args((Void)); -static Void local find Args((Void)); -static Bool local startEdit Args((Int,String)); -static Void local runEditor Args((Void)); -static Void local setModule Args((Void)); -static Module local findEvalModule Args((Void)); -static Void local evaluator Args((Void)); -static Void local stopAnyPrinting Args((Void)); -static Void local showtype Args((Void)); -static String local objToStr Args((Module, Cell)); -static Void local info Args((Void)); -static Void local printSyntax Args((Name)); -static Void local showInst Args((Inst)); -static Void local describe Args((Text)); -static Void local listNames Args((Void)); - -static Void local toggleSet Args((Char,Bool)); -static Void local togglesIn Args((Bool)); -static Void local optionInfo Args((Void)); +static Void local initialize ( Int,String [] ); +static Void local promptForInput ( String ); +static Void local interpreter ( Int,String [] ); +static Void local menu ( Void ); +static Void local guidance ( Void ); +static Void local forHelp ( Void ); +static Void local set ( Void ); +static Void local changeDir ( Void ); +static Void local load ( Void ); +static Void local project ( Void ); +static Void local readScripts ( Int ); +static Void local whatScripts ( Void ); +static Void local editor ( Void ); +static Void local find ( Void ); +static Bool local startEdit ( Int,String ); +static Void local runEditor ( Void ); +static Void local setModule ( Void ); +static Module local findEvalModule ( Void ); +static Void local evaluator ( Void ); +static Void local stopAnyPrinting ( Void ); +static Void local showtype ( Void ); +static String local objToStr ( Module, Cell ); +static Void local info ( Void ); +static Void local printSyntax ( Name ); +static Void local showInst ( Inst ); +static Void local describe ( Text ); +static Void local listNames ( Void ); + +static Void local toggleSet ( Char,Bool ); +static Void local togglesIn ( Bool ); +static Void local optionInfo ( Void ); #if USE_REGISTRY || HUGS_FOR_WINDOWS -static String local optionsToStr Args((Void)); +static String local optionsToStr ( Void ); #endif -static Void local readOptions Args((String)); -static Bool local processOption Args((String)); -static Void local setHeapSize Args((String)); -static Int local argToInt Args((String)); - -static Void local loadProject Args((String)); -static Void local clearProject Args((Void)); -static Bool local addScript Args((Int)); -static Void local forgetScriptsFrom Args((Script)); -static Void local setLastEdit Args((String,Int)); -static Void local failed Args((Void)); -static String local strCopy Args((String)); -static Void local browseit Args((Module,String,Bool)); -static Void local browse Args((Void)); +static Void local readOptions ( String ); +static Bool local processOption ( String ); +static Void local setHeapSize ( String ); +static Int local argToInt ( String ); + +static Void local loadProject ( String ); +static Void local clearProject ( Void ); +static Bool local addScript ( Int ); +static Void local forgetScriptsFrom ( Script ); +static Void local setLastEdit ( String,Int ); +static Void local failed ( Void ); +static String local strCopy ( String ); +static Void local browseit ( Module,String,Bool ); +static Void local browse ( Void ); /* -------------------------------------------------------------------------- * Machine dependent code for Hugs interpreter: @@ -130,8 +130,8 @@ typedef } ScriptInfo; -static Void local makeStackEntry Args((ScriptInfo*,String)); -static Void local addStackEntry Args((String)); +static Void local makeStackEntry ( ScriptInfo*,String ); +static Void local addStackEntry ( String ); static ScriptInfo scriptInfo[NUM_SCRIPTS]; @@ -202,7 +202,7 @@ return; #ifndef NO_MAIN /* we omit main when building the "Hugs server" */ -Main main Args((Int, String [])); /* now every func has a prototype */ +Main main ( Int, String [] ); /* now every func has a prototype */ Main main(argc,argv) int argc; @@ -483,7 +483,7 @@ ToDo #define PUTStr(c,s) \ next=PUTStr_aux(next,c,s) -static String local PUTStr_aux Args((String,Char, String)); +static String local PUTStr_aux ( String,Char, String)); static String local PUTStr_aux(next,c,s) String next; @@ -2307,9 +2307,9 @@ typedef struct _HugsStream { Int next; /* next space in buffer */ } HugsStream; -static Void local vBufferedPrintf Args((HugsStream*, const char*, va_list)); -static Void local bufferedPutchar Args((HugsStream*, Char)); -static String local bufferClear Args((HugsStream *stream)); +static Void local vBufferedPrintf ( HugsStream*, const char*, va_list ); +static Void local bufferedPutchar ( HugsStream*, Char ); +static String local bufferClear ( HugsStream *stream ); static Void local vBufferedPrintf(stream, fmt, ap) HugsStream* stream; diff --git a/ghc/interpreter/input.c b/ghc/interpreter/input.c index c0178b0..cb744af 100644 --- a/ghc/interpreter/input.c +++ b/ghc/interpreter/input.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: input.c,v $ - * $Revision: 1.20 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.21 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -78,51 +78,51 @@ String preprocessor = 0; * Local function prototypes: * ------------------------------------------------------------------------*/ -static Void local initCharTab Args((Void)); -static Void local fileInput Args((String,Long)); -static Bool local literateMode Args((String)); -static Bool local linecmp Args((String,String)); -static Int local nextLine Args((Void)); -static Void local skip Args((Void)); -static Void local thisLineIs Args((Int)); -static Void local newlineSkip Args((Void)); -static Void local closeAnyInput Args((Void)); - - Int yyparse Args((Void)); /* can't stop yacc making this */ +static Void local initCharTab ( Void ); +static Void local fileInput ( String,Long ); +static Bool local literateMode ( String ); +static Bool local linecmp ( String,String ); +static Int local nextLine ( Void ); +static Void local skip ( Void ); +static Void local thisLineIs ( Int ); +static Void local newlineSkip ( Void ); +static Void local closeAnyInput ( Void ); + + Int yyparse ( Void ); /* can't stop yacc making this */ /* public, but don't advertise */ /* it in a header file. */ -static Void local endToken Args((Void)); -static Text local readOperator Args((Void)); -static Text local readIdent Args((Void)); -static Cell local readRadixNumber Args((Int)); -static Cell local readNumber Args((Void)); -static Cell local readChar Args((Void)); -static Cell local readString Args((Void)); -static Void local saveStrChr Args((Char)); -static Cell local readAChar Args((Bool)); - -static Bool local lazyReadMatches Args((String)); -static Cell local readEscapeChar Args((Bool)); -static Void local skipGap Args((Void)); -static Cell local readCtrlChar Args((Void)); -static Cell local readOctChar Args((Void)); -static Cell local readHexChar Args((Void)); -static Int local readHexDigit Args((Char)); -static Cell local readDecChar Args((Void)); - -static Void local goOffside Args((Int)); -static Void local unOffside Args((Void)); -static Bool local canUnOffside Args((Void)); - -static Void local skipWhitespace Args((Void)); -static Int local yylex Args((Void)); -static Int local repeatLast Args((Void)); - -static Cell local parseInput Args((Int)); - -static Bool local doesNotExceed Args((String,Int,Int)); -static Int local stringToInt Args((String,Int)); +static Void local endToken ( Void ); +static Text local readOperator ( Void ); +static Text local readIdent ( Void ); +static Cell local readRadixNumber ( Int ); +static Cell local readNumber ( Void ); +static Cell local readChar ( Void ); +static Cell local readString ( Void ); +static Void local saveStrChr ( Char ); +static Cell local readAChar ( Bool ); + +static Bool local lazyReadMatches ( String ); +static Cell local readEscapeChar ( Bool ); +static Void local skipGap ( Void ); +static Cell local readCtrlChar ( Void ); +static Cell local readOctChar ( Void ); +static Cell local readHexChar ( Void ); +static Int local readHexDigit ( Char ); +static Cell local readDecChar ( Void ); + +static Void local goOffside ( Int ); +static Void local unOffside ( Void ); +static Bool local canUnOffside ( Void ); + +static Void local skipWhitespace ( Void ); +static Int local yylex ( Void ); +static Int local repeatLast ( Void ); + +static Cell local parseInput ( Int ); + +static Bool local doesNotExceed ( String,Int,Int ); +static Int local stringToInt ( String,Int ); /* -------------------------------------------------------------------------- diff --git a/ghc/interpreter/interface.c b/ghc/interpreter/interface.c index 49e4cc8..36098ea 100644 --- a/ghc/interpreter/interface.c +++ b/ghc/interpreter/interface.c @@ -7,8 +7,8 @@ * Hugs version 1.4, December 1997 * * $RCSfile: interface.c,v $ - * $Revision: 1.37 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.38 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -118,54 +118,52 @@ viz, the entire Prelude at once: * local function prototypes: * ------------------------------------------------------------------------*/ -static Void startGHCValue Args((Int,VarId,Type)); -static Void finishGHCValue Args((VarId)); +static Void startGHCValue ( Int,VarId,Type ); +static Void finishGHCValue ( VarId ); -static Void startGHCSynonym Args((Int,Cell,List,Type)); -static Void finishGHCSynonym Args((Tycon)); +static Void startGHCSynonym ( Int,Cell,List,Type ); +static Void finishGHCSynonym ( Tycon ); -static Void startGHCClass Args((Int,List,Cell,List,List)); -static Class finishGHCClass Args((Class)); +static Void startGHCClass ( Int,List,Cell,List,List ); +static Class finishGHCClass ( Class ); -static Inst startGHCInstance Args((Int,List,Pair,VarId)); -static Void finishGHCInstance Args((Inst)); +static Inst startGHCInstance ( Int,List,Pair,VarId ); +static Void finishGHCInstance ( Inst ); -static Void startGHCImports Args((ConId,List)); -static Void finishGHCImports Args((ConId,List)); +static Void startGHCImports ( ConId,List ); +static Void finishGHCImports ( ConId,List ); -static Void startGHCExports Args((ConId,List)); -static Void finishGHCExports Args((ConId,List)); +static Void startGHCExports ( ConId,List ); +static Void finishGHCExports ( ConId,List ); static Void finishGHCFixdecl ( Cell prec, Cell assoc, ConVarId name ); -static Void finishGHCModule Args((Cell)); -static Void startGHCModule Args((Text, Int, Text)); +static Void finishGHCModule ( Cell ); +static Void startGHCModule ( Text, Int, Text ); -static Void startGHCDataDecl Args((Int,List,Cell,List,List)); +static Void startGHCDataDecl ( Int,List,Cell,List,List ); static List finishGHCDataDecl ( ConId tyc ); +/* Supporting stuff for {start|finish}GHCDataDecl */ +static List startGHCConstrs ( Int,List,List ); +static Name startGHCSel ( Int,Pair ); +static Name startGHCConstr ( Int,Int,Triple ); -static Void startGHCNewType Args((Int,List,Cell,List,Cell)); +static Void startGHCNewType ( Int,List,Cell,List,Cell ); static Void finishGHCNewType ( ConId tyc ); -/* Supporting stuff for {start|finish}GHCDataDecl */ -static List startGHCConstrs Args((Int,List,List)); -static Name startGHCSel Args((Int,Pair)); -static Name startGHCConstr Args((Int,Int,Triple)); - - -static Kinds tvsToKind Args((List)); -static Int arityFromType Args((Type)); -static Int arityInclDictParams Args((Type)); -static Bool allTypesKnown ( Type type, List aktys /* [QualId] */, ConId thisMod ); +static Kinds tvsToKind ( List ); +static Int arityFromType ( Type ); +static Int arityInclDictParams ( Type ); +static Bool allTypesKnown ( Type type, + List aktys /* [QualId] */, + ConId thisMod ); -static List ifTyvarsIn Args((Type)); - -static Type tvsToOffsets Args((Int,Type,List)); -static Type conidcellsToTycons Args((Int,Type)); - -static void* lookupObjName ( char* ); +static List ifTyvarsIn ( Type ); +static Type tvsToOffsets ( Int,Type,List ); +static Type conidcellsToTycons ( Int,Type ); +static void* lookupObjName ( char* ); diff --git a/ghc/interpreter/link.c b/ghc/interpreter/link.c index 269412d..74918c6 100644 --- a/ghc/interpreter/link.c +++ b/ghc/interpreter/link.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: link.c,v $ - * $Revision: 1.49 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.50 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -269,7 +269,7 @@ static Name predefinePrim ( String s ) * * ------------------------------------------------------------------------*/ -/* In standalone mode, linkPreludeTC, linkPreludeCM and linkPrimitiveNames +/* In standalone mode, linkPreludeTC, linkPreludeCM and linkPrimNames are called, in that order, during static analysis of Prelude.hs. In combined mode such an analysis does not happen. Instead these calls will be made as a result of a call link(POSTPREL). @@ -428,7 +428,7 @@ Void linkPreludeCM(void) { /* Hook to cfuns and mfuns in */ } } -Void linkPrimitiveNames(void) { /* Hook to names defined in Prelude */ +Void linkPrimNames ( void ) { /* Hook to names defined in Prelude */ static Bool initialised = FALSE; if (!initialised) { @@ -521,7 +521,7 @@ Int what; { setCurrModule(modulePrelude); linkPreludeTC(); linkPreludeCM(); - linkPrimitiveNames(); + linkPrimNames(); nameUnpackString = linkName("hugsprimUnpackString"); namePMFail = linkName("hugsprimPmFail"); diff --git a/ghc/interpreter/machdep.c b/ghc/interpreter/machdep.c index ad1d572..823b5b7 100644 --- a/ghc/interpreter/machdep.c +++ b/ghc/interpreter/machdep.c @@ -13,8 +13,8 @@ * included in the distribution. * * $RCSfile: machdep.c,v $ - * $Revision: 1.19 $ - * $Date: 2000/02/24 14:05:55 $ + * $Revision: 1.20 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #ifdef HAVE_SIGNAL_H @@ -65,7 +65,7 @@ extern HCURSOR HandCursor; /* Forward references to cursors */ extern HCURSOR GarbageCursor; extern HCURSOR SaveCursor; -static void local DrawStatusLine Args((HWND)); +static void local DrawStatusLine ( HWND ); #endif #if DOS @@ -118,15 +118,15 @@ int allow_break_count = 0; #define HugsRoot ("SOFTWARE\\Haskell\\Hugs\\" HUGS_VERSION "\\") #define ProjectRoot ("SOFTWARE\\Haskell\\Projects\\") -static Bool local createKey Args((HKEY, String, PHKEY, REGSAM)); -static Bool local queryValue Args((HKEY, String, String, LPDWORD, LPBYTE, DWORD)); -static Bool local setValue Args((HKEY, String, String, DWORD, LPBYTE, DWORD)); -static String local readRegString Args((HKEY, String, String, String)); -static Int local readRegInt Args((String,Int)); -static Bool local writeRegString Args((String,String)); -static Bool local writeRegInt Args((String,Int)); +static Bool local createKey ( HKEY, String, PHKEY, REGSAM ); +static Bool local queryValue ( HKEY, String, String, LPDWORD, LPBYTE, DWORD ); +static Bool local setValue ( HKEY, String, String, DWORD, LPBYTE, DWORD ); +static String local readRegString ( HKEY, String, String, String ); +static Int local readRegInt ( String,Int ); +static Bool local writeRegString ( String,String ); +static Bool local writeRegInt ( String,Int ); -static String local readRegChildStrings Args((HKEY, String, String, Char, String)); +static String local readRegChildStrings ( HKEY, String, String, Char, String ); #endif /* USE_REGISTRY */ /* -------------------------------------------------------------------------- @@ -145,8 +145,8 @@ typedef time_t Time; #define timeEarlier(earlier,now) (earlier < now) #endif -static Bool local readable Args((String)); -static Void local getFileInfo Args((String, Time *, Long *)); +static Bool local readable ( String ); +static Void local getFileInfo ( String, Time *, Long * ); static Void local getFileInfo(f,tm,sz) /* find time stamp and size of file*/ String f; @@ -241,16 +241,15 @@ String f; { * Search for script files on the HUGS path: * ------------------------------------------------------------------------*/ -static String local hugsdir Args((Void)); +static String local hugsdir ( Void ); #if HSCRIPT -static String local hscriptDir Args((Void)); +static String local hscriptDir ( Void ); #endif -//static String local RealPath Args((String)); -static int local pathCmp Args((String, String)); -static String local normPath Args((String)); -static Void local searchChr Args((Int)); -static Void local searchStr Args((String)); -static Bool local tryEndings Args((String)); +static int local pathCmp ( String, String ); +static String local normPath ( String ); +static Void local searchChr ( Int ); +static Void local searchStr ( String ); +static Bool local tryEndings ( String ); #if DOS_FILENAMES # define SLASH '\\' @@ -813,7 +812,7 @@ String getExtraObjectInfo ( String primaryObjectName, * eg substPath("a:b:c::d:e","x:y:z") = "a:b:c:x:y:z:d:e" * ------------------------------------------------------------------------*/ -static String local substPath Args((String,String)); +static String local substPath ( String,String ); static String local substPath(new,sub) /* substitute sub path into new path*/ String new; @@ -1196,7 +1195,7 @@ Int readTerminalChar() { /* read character from terminal */ Bool broken = FALSE; static Bool breakReqd = FALSE; static sigProto(ignoreBreak); -static Void local installHandlers Args((Void)); +static Void local installHandlers ( Void ); Bool breakOn(reqd) /* set break trapping on if reqd, */ Bool reqd; { /* or off otherwise, returning old */ @@ -1454,9 +1453,9 @@ int snprintf(char* buffer, int count, const char* fmt, ...) { #define HugsRoot ("SOFTWARE\\Haskell\\Hugs\\" HUGS_VERSION "\\") -static Bool local createKey Args((HKEY, PHKEY, REGSAM)); -static Bool local queryValue Args((HKEY, String, LPDWORD, LPBYTE, DWORD)); -static Bool local setValue Args((HKEY, String, DWORD, LPBYTE, DWORD)); +static Bool local createKey ( HKEY, PHKEY, REGSAM ); +static Bool local queryValue ( HKEY, String, LPDWORD, LPBYTE, DWORD ); +static Bool local setValue ( HKEY, String, DWORD, LPBYTE, DWORD ); static Bool local createKey(hKey, phRootKey, samDesired) HKEY hKey; diff --git a/ghc/interpreter/output.c b/ghc/interpreter/output.c index b8274ae..ea6a585 100644 --- a/ghc/interpreter/output.c +++ b/ghc/interpreter/output.c @@ -10,8 +10,8 @@ * included in the distribution. * * $RCSfile: output.c,v $ - * $Revision: 1.15 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.16 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -26,30 +26,30 @@ * Local function prototypes: * ------------------------------------------------------------------------*/ -static Void local put Args((Int,Cell)); -static Void local putFlds Args((Cell,List)); -static Void local putComp Args((Cell,List)); -static Void local putQual Args((Cell)); -static Bool local isDictVal Args((Cell)); -static Cell local maySkipDict Args((Cell)); -static Void local putAp Args((Int,Cell)); -static Void local putOverInfix Args((Int,Text,Syntax,Cell)); -static Void local putInfix Args((Int,Text,Syntax,Cell,Cell)); -static Void local putSimpleAp Args((Cell,Int)); -static Void local putTuple Args((Int,Cell)); -static Int local unusedTups Args((Int,Cell)); -static Void local unlexOp Args((Text)); - -static Void local putSigType Args((Cell)); -static Void local putContext Args((List,List,Int)); -static Void local putPred Args((Cell,Int)); -static Void local putType Args((Cell,Int,Int)); -static Void local putTyVar Args((Int)); -static Bool local putTupleType Args((Cell,Int)); -static Void local putApType Args((Type,Int,Int)); - -static Void local putKind Args((Kind)); -static Void local putKinds Args((Kinds)); +static Void local put ( Int,Cell ); +static Void local putFlds ( Cell,List ); +static Void local putComp ( Cell,List ); +static Void local putQual ( Cell ); +static Bool local isDictVal ( Cell ); +static Cell local maySkipDict ( Cell ); +static Void local putAp ( Int,Cell ); +static Void local putOverInfix ( Int,Text,Syntax,Cell ); +static Void local putInfix ( Int,Text,Syntax,Cell,Cell ); +static Void local putSimpleAp ( Cell,Int ); +static Void local putTuple ( Int,Cell ); +static Int local unusedTups ( Int,Cell ); +static Void local unlexOp ( Text ); + +static Void local putSigType ( Cell ); +static Void local putContext ( List,List,Int ); +static Void local putPred ( Cell,Int ); +static Void local putType ( Cell,Int,Int ); +static Void local putTyVar ( Int ); +static Bool local putTupleType ( Cell,Int ); +static Void local putApType ( Type,Int,Int ); + +static Void local putKind ( Kind ); +static Void local putKinds ( Kinds ); /* -------------------------------------------------------------------------- @@ -925,8 +925,7 @@ Kinds ks; { * Main drivers: * ------------------------------------------------------------------------*/ -extern FILE *mystdout Args((Void)); -FILE *mystdout() { +FILE *mystdout ( Void ) { /* We use this from the gdb command line when debugging */ return stdout; } diff --git a/ghc/interpreter/parser.y b/ghc/interpreter/parser.y index 53778f8..f44848d 100644 --- a/ghc/interpreter/parser.y +++ b/ghc/interpreter/parser.y @@ -12,8 +12,8 @@ * included in the distribution. * * $RCSfile: parser.y,v $ - * $Revision: 1.24 $ - * $Date: 2000/03/09 06:14:38 $ + * $Revision: 1.25 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ %{ @@ -33,21 +33,21 @@ #define yyerror(s) /* errors handled elsewhere */ #define YYSTYPE Cell -static Cell local gcShadow Args((Int,Cell)); -static Void local syntaxError Args((String)); -static String local unexpected Args((Void)); -static Cell local checkPrec Args((Cell)); -static Void local fixDefn Args((Syntax,Cell,Cell,List)); -static Cell local buildTuple Args((List)); -static List local checkCtxt Args((List)); -static Cell local checkPred Args((Cell)); -static Pair local checkDo Args((List)); -static Cell local checkTyLhs Args((Cell)); +static Cell local gcShadow ( Int,Cell ); +static Void local syntaxError ( String ); +static String local unexpected ( Void ); +static Cell local checkPrec ( Cell ); +static Void local fixDefn ( Syntax,Cell,Cell,List ); +static Cell local buildTuple ( List ); +static List local checkCtxt ( List ); +static Cell local checkPred ( Cell ); +static Pair local checkDo ( List ); +static Cell local checkTyLhs ( Cell ); #if !TREX -static Void local noTREX Args((String)); +static Void local noTREX ( String ); #endif #if !IPARAM -static Void local noIP Args((String)); +static Void local noIP ( String ); #endif /* For the purposes of reasonably portable garbage collection, it is diff --git a/ghc/interpreter/preds.c b/ghc/interpreter/preds.c index 5da4940..7c5a7a8 100644 --- a/ghc/interpreter/preds.c +++ b/ghc/interpreter/preds.c @@ -9,51 +9,51 @@ * included in the distribution. * * $RCSfile: preds.c,v $ - * $Revision: 1.10 $ - * $Date: 2000/03/06 08:38:04 $ + * $Revision: 1.11 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ /* -------------------------------------------------------------------------- * Local function prototypes: * ------------------------------------------------------------------------*/ -static Cell local assumeEvid Args((Cell,Int)); +static Cell local assumeEvid ( Cell,Int ); #if IPARAM -static Cell local findIPEvid Args((Text)); -static Void local removeIPEvid Args((Text)); +static Cell local findIPEvid ( Text ); +static Void local removeIPEvid ( Text ); #endif -static List local makePredAss Args((List,Int)); -static List local copyPreds Args((List)); -static Void local qualify Args((List,Cell)); -static Void local qualifyBinding Args((List,Cell)); -static Cell local qualifyExpr Args((Int,List,Cell)); -static Void local overEvid Args((Cell,Cell)); - -static Void local cutoffExceeded Args((Cell,Int,List)); -static Cell local scFind Args((Cell,Cell,Int,Cell,Int,Int)); -static Cell local scEntail Args((List,Cell,Int,Int)); -static Cell local entail Args((List,Cell,Int,Int)); -static Cell local inEntail Args((List,Cell,Int,Int)); +static List local makePredAss ( List,Int ); +static List local copyPreds ( List ); +static Void local qualify ( List,Cell ); +static Void local qualifyBinding ( List,Cell ); +static Cell local qualifyExpr ( Int,List,Cell ); +static Void local overEvid ( Cell,Cell ); + +static Void local cutoffExceeded ( Cell,Int,List ); +static Cell local scFind ( Cell,Cell,Int,Cell,Int,Int ); +static Cell local scEntail ( List,Cell,Int,Int ); +static Cell local entail ( List,Cell,Int,Int ); +static Cell local inEntail ( List,Cell,Int,Int ); #if MULTI_INST -static Cell local inEntails Args((List,Cell,Int,Int)); -static Bool local instCompare Args((Inst, Inst)); +static Cell local inEntails ( List,Cell,Int,Int ); +static Bool local instCompare ( Inst, Inst ); #endif #if TREX -static Cell local lacksNorm Args((Type,Int,Cell)); +static Cell local lacksNorm ( Type,Int,Cell ); #endif -static List local scSimplify Args((List)); -static Void local elimTauts Args((Void)); -static Bool local anyGenerics Args((Type,Int)); -static List local elimOuterPreds Args((List)); -static List local elimPredsUsing Args((List,List)); -static Void local reducePreds Args((Void)); -static Void local normPreds Args((Int)); - -static Bool local resolveDefs Args((List)); -static Bool local resolveVar Args((Int)); -static Class local classConstraining Args((Int,Cell,Int)); -static Bool local instComp_ Args((Inst,Inst)); +static List local scSimplify ( List ); +static Void local elimTauts ( Void ); +static Bool local anyGenerics ( Type,Int ); +static List local elimOuterPreds ( List ); +static List local elimPredsUsing ( List,List ); +static Void local reducePreds ( Void ); +static Void local normPreds ( Int ); + +static Bool local resolveDefs ( List ); +static Bool local resolveVar ( Int ); +static Class local classConstraining ( Int,Cell,Int ); +static Bool local instComp_ ( Inst,Inst ); /* -------------------------------------------------------------------------- * Predicate assignments: diff --git a/ghc/interpreter/prelude.h b/ghc/interpreter/prelude.h index 4d1ab8b..7e255a3 100644 --- a/ghc/interpreter/prelude.h +++ b/ghc/interpreter/prelude.h @@ -10,8 +10,8 @@ * included in the distribution. * * $RCSfile: prelude.h,v $ - * $Revision: 1.8 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.9 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #define NON_POSIX_SOURCE @@ -112,12 +112,6 @@ extern HWND hWndMain; /* main window handle */ * dynamic linking declarations *-------------------------------------------------------------------------*/ -#if HAVE_PROTOTYPES /* To enable use of prototypes whenever possible */ -#define Args(x) x -#else -#define Args(x) () -#endif - /* local = prefix for locally defined functions */ /* far = prefix for far pointers */ #if DOS @@ -204,14 +198,14 @@ extern int stricmp Args((const char *, const char*)); *-------------------------------------------------------------------------*/ #if !DOS && VOID_INT_SIGNALS -# define sigProto(nm) void nm Args((int)) +# define sigProto(nm) void nm ( int ) # define sigRaise(nm) nm(1) -# define sigHandler(nm) void nm(sig_arg) int sig_arg; +# define sigHandler(nm) void nm ( sig_arg ) int sig_arg; # define sigResume return #else -# define sigProto(nm) int nm Args((Void)) +# define sigProto(nm) int nm ( Void ) # define sigRaise(nm) nm() -# define sigHandler(nm) int nm(Void) +# define sigHandler(nm) int nm ( Void ) # define sigResume return 1 #endif @@ -305,15 +299,15 @@ extern int vsnprintf Args((char*, int, const char*, va_list)); #if REDIRECT_OUTPUT -extern Void hugsPrintf Args((const char *, ...)); -extern Void hugsPutchar Args((int)); -extern Void hugsFlushStdout Args((Void)); -extern Void hugsEnableOutput Args((Bool)); -extern String hugsClearOutputBuffer Args((Void)); +extern Void hugsPrintf ( const char *, ... ); +extern Void hugsPutchar ( int ); +extern Void hugsFlushStdout ( Void ); +extern Void hugsEnableOutput ( Bool ); +extern String hugsClearOutputBuffer ( Void ); -extern Void hugsFFlush Args((FILE*)); -extern Void hugsFPrintf Args((FILE*, const char*, ...)); -extern Void hugsPutc Args((int, FILE*)); +extern Void hugsFFlush ( FILE* ); +extern Void hugsFPrintf ( FILE*, const char*, ... ); +extern Void hugsPutc ( int, FILE* ); #define Printf hugsPrintf #define Putchar hugsPutchar diff --git a/ghc/interpreter/scc.c b/ghc/interpreter/scc.c index ba3b456..837fd17 100644 --- a/ghc/interpreter/scc.c +++ b/ghc/interpreter/scc.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: scc.c,v $ - * $Revision: 1.5 $ - * $Date: 1999/10/15 21:40:54 $ + * $Revision: 1.6 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #ifndef SCC_C @@ -20,10 +20,8 @@ static Cell daSccs = NIL; static Int daCount; -static Int local sccMin Args((Int,Int)); - -static Int local sccMin(x,y) /* calculate minimum of x,y */ -Int x, y; { /* (unless y is zero) */ +static Int local sccMin ( Int x, Int y) /* calculate minimum of x,y */ +{ /* (unless y is zero) */ return (x<=y || y==0) ? x : y; } #endif @@ -44,9 +42,8 @@ Int x, y; { /* (unless y is zero) */ * This would probably have been a good application for C++ templates ... * ------------------------------------------------------------------------*/ -static Int local LOWLINK Args((Cell)); /* local function */ -static Int local LOWLINK(v) /* calculate `lowlink' of v */ -Cell v; { +static Int local LOWLINK( Cell v ) /* calculate `lowlink' of v */ +{ Int low = daCount; Int dfn = daCount; /* depth first search no. of v */ List ws = DEPENDS(v); /* adjacency list for v */ diff --git a/ghc/interpreter/static.c b/ghc/interpreter/static.c index be01793..5c80d98 100644 --- a/ghc/interpreter/static.c +++ b/ghc/interpreter/static.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: static.c,v $ - * $Revision: 1.29 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.30 $ + * $Date: 2000/03/13 11:37:16 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -22,166 +22,166 @@ * local function prototypes: * ------------------------------------------------------------------------*/ -static Void local kindError Args((Int,Constr,Constr,String,Kind,Int)); -static Void local checkQualImport Args((Pair)); -static Void local checkUnqualImport Args((Triple)); - -static Name local lookupName Args((Text,List)); -static List local checkSubentities Args((List,List,List,String,Text)); -static List local checkExportTycon Args((List,Text,Cell,Tycon)); -static List local checkExportClass Args((List,Text,Cell,Class)); -static List local checkExport Args((List,Text,Cell)); -static List local checkImportEntity Args((List,Module,Bool,Cell)); -static List local resolveImportList Args((Module,Cell,Bool)); -static Void local checkImportList Args((Pair)); - -static Void local importEntity Args((Module,Cell)); -static Void local importName Args((Module,Name)); -static Void local importTycon Args((Module,Tycon)); -static Void local importClass Args((Module,Class)); -static List local checkExports Args((List)); - -static Void local checkTyconDefn Args((Tycon)); -static Void local depConstrs Args((Tycon,List,Cell)); -static List local addSels Args((Int,Name,List,List)); -static List local selectCtxt Args((List,List)); -static Void local checkSynonyms Args((List)); -static List local visitSyn Args((List,Tycon,List)); -static Type local instantiateSyn Args((Type,Type)); - -static Void local checkClassDefn Args((Class)); -static Cell local depPredExp Args((Int,List,Cell)); -static Void local checkMems Args((Class,List,Cell)); -static Void local checkMems2 Args((Class,Cell)); -static Void local addMembers Args((Class)); -static Name local newMember Args((Int,Int,Cell,Type,Class)); -static Text local generateText Args((String,Class)); - -static List local classBindings Args((String,Class,List)); -static Name local memberName Args((Class,Text)); -static List local numInsert Args((Int,Cell,List)); - -static List local maybeAppendVar Args((Cell,List)); - -static Type local checkSigType Args((Int,String,Cell,Type)); -static Void local checkOptQuantVars Args((Int,List,List)); -static Type local depTopType Args((Int,List,Type)); -static Type local depCompType Args((Int,List,Type)); -static Type local depTypeExp Args((Int,List,Type)); -static Type local depTypeVar Args((Int,List,Text)); -static List local checkQuantVars Args((Int,List,List,Cell)); -static List local otvars Args((Cell,List)); -static Bool local osubset Args((List,List)); -static Void local kindConstr Args((Int,Int,Int,Constr)); -static Kind local kindAtom Args((Int,Constr)); -static Void local kindPred Args((Int,Int,Int,Cell)); -static Void local kindType Args((Int,String,Type)); -static Void local fixKinds Args((Void)); - -static Void local kindTCGroup Args((List)); -static Void local initTCKind Args((Cell)); -static Void local kindTC Args((Cell)); -static Void local genTC Args((Cell)); - -static Void local checkInstDefn Args((Inst)); -static Void local insertInst Args((Inst)); -static Bool local instCompare Args((Inst,Inst)); -static Name local newInstImp Args((Inst)); -static Void local kindInst Args((Inst,Int)); -static Void local checkDerive Args((Tycon,List,List,Cell)); -static Void local addDerInst Args((Int,Class,List,List,Type,Int)); -static Void local deriveContexts Args((List)); -static Void local initDerInst Args((Inst)); -static Void local calcInstPreds Args((Inst)); -static Void local maybeAddPred Args((Cell,Int,Int,List)); -static List local calcFunDeps Args((List)); -static Cell local copyAdj Args((Cell,Int,Int)); -static Void local tidyDerInst Args((Inst)); -static List local otvarsZonk Args((Cell,List,Int)); - -static Void local addDerivImp Args((Inst)); - -static Void local checkDefaultDefns Args((Void)); - -static Void local checkForeignImport Args((Name)); -static Void local checkForeignExport Args((Name)); - -static Cell local tidyInfix Args((Int,Cell)); -static Pair local attachFixity Args((Int,Cell)); -static Syntax local lookupSyntax Args((Text)); - -static Cell local checkPat Args((Int,Cell)); -static Cell local checkMaybeCnkPat Args((Int,Cell)); -static Cell local checkApPat Args((Int,Int,Cell)); -static Void local addToPatVars Args((Int,Cell)); -static Name local conDefined Args((Int,Cell)); -static Void local checkIsCfun Args((Int,Name)); -static Void local checkCfunArgs Args((Int,Cell,Int)); -static Cell local checkPatType Args((Int,String,Cell,Type)); -static Cell local applyBtyvs Args((Cell)); -static Cell local bindPat Args((Int,Cell)); -static Void local bindPats Args((Int,List)); - -static List local extractSigdecls Args((List)); -static List local extractFixdecls Args((List)); -static List local extractBindings Args((List)); -static List local getPatVars Args((Int,Cell,List)); -static List local addPatVar Args((Int,Cell,List)); -static List local eqnsToBindings Args((List,List,List,List)); -static Void local notDefined Args((Int,List,Cell)); -static Cell local findBinding Args((Text,List)); -static Cell local getAttr Args((List,Cell)); -static Void local addSigdecl Args((List,Cell)); -static Void local addFixdecl Args((List,List,List,List,Triple)); -static Void local dupFixity Args((Int,Text)); -static Void local missFixity Args((Int,Text)); - -static List local dependencyAnal Args((List)); -static List local topDependAnal Args((List)); -static Void local addDepField Args((Cell)); -static Void local remDepField Args((List)); -static Void local remDepField1 Args((Cell)); -static Void local clearScope Args((Void)); -static Void local withinScope Args((List)); -static Void local leaveScope Args((Void)); -static Void local saveSyntax Args((Cell,Cell)); - -static Void local depBinding Args((Cell)); -static Void local depDefaults Args((Class)); -static Void local depInsts Args((Inst)); -static Void local depClassBindings Args((List)); -static Void local depAlt Args((Cell)); -static Void local depRhs Args((Cell)); -static Void local depGuard Args((Cell)); -static Cell local depExpr Args((Int,Cell)); -static Void local depPair Args((Int,Cell)); -static Void local depTriple Args((Int,Cell)); -static Void local depComp Args((Int,Cell,List)); -static Void local depCaseAlt Args((Int,Cell)); -static Cell local depVar Args((Int,Cell)); -static Cell local depQVar Args((Int,Cell)); -static Void local depConFlds Args((Int,Cell,Bool)); -static Void local depUpdFlds Args((Int,Cell)); -static List local depFields Args((Int,Cell,List,Bool)); +static Void local kindError ( Int,Constr,Constr,String,Kind,Int ); +static Void local checkQualImport ( Pair ); +static Void local checkUnqualImport ( Triple ); + +static Name local lookupName ( Text,List ); +static List local checkSubentities ( List,List,List,String,Text ); +static List local checkExportTycon ( List,Text,Cell,Tycon ); +static List local checkExportClass ( List,Text,Cell,Class ); +static List local checkExport ( List,Text,Cell ); +static List local checkImportEntity ( List,Module,Bool,Cell ); +static List local resolveImportList ( Module,Cell,Bool ); +static Void local checkImportList ( Pair ); + +static Void local importEntity ( Module,Cell ); +static Void local importName ( Module,Name ); +static Void local importTycon ( Module,Tycon ); +static Void local importClass ( Module,Class ); +static List local checkExports ( List ); + +static Void local checkTyconDefn ( Tycon ); +static Void local depConstrs ( Tycon,List,Cell ); +static List local addSels ( Int,Name,List,List ); +static List local selectCtxt ( List,List ); +static Void local checkSynonyms ( List ); +static List local visitSyn ( List,Tycon,List ); +static Type local instantiateSyn ( Type,Type ); + +static Void local checkClassDefn ( Class ); +static Cell local depPredExp ( Int,List,Cell ); +static Void local checkMems ( Class,List,Cell ); +static Void local checkMems2 ( Class,Cell ); +static Void local addMembers ( Class ); +static Name local newMember ( Int,Int,Cell,Type,Class ); +static Text local generateText ( String,Class ); + +static List local classBindings ( String,Class,List ); +static Name local memberName ( Class,Text ); +static List local numInsert ( Int,Cell,List ); + +static List local maybeAppendVar ( Cell,List ); + +static Type local checkSigType ( Int,String,Cell,Type ); +static Void local checkOptQuantVars ( Int,List,List ); +static Type local depTopType ( Int,List,Type ); +static Type local depCompType ( Int,List,Type ); +static Type local depTypeExp ( Int,List,Type ); +static Type local depTypeVar ( Int,List,Text ); +static List local checkQuantVars ( Int,List,List,Cell ); +static List local otvars ( Cell,List ); +static Bool local osubset ( List,List ); +static Void local kindConstr ( Int,Int,Int,Constr ); +static Kind local kindAtom ( Int,Constr ); +static Void local kindPred ( Int,Int,Int,Cell ); +static Void local kindType ( Int,String,Type ); +static Void local fixKinds ( Void ); + +static Void local kindTCGroup ( List ); +static Void local initTCKind ( Cell ); +static Void local kindTC ( Cell ); +static Void local genTC ( Cell ); + +static Void local checkInstDefn ( Inst ); +static Void local insertInst ( Inst ); +static Bool local instCompare ( Inst,Inst ); +static Name local newInstImp ( Inst ); +static Void local kindInst ( Inst,Int ); +static Void local checkDerive ( Tycon,List,List,Cell ); +static Void local addDerInst ( Int,Class,List,List,Type,Int ); +static Void local deriveContexts ( List ); +static Void local initDerInst ( Inst ); +static Void local calcInstPreds ( Inst ); +static Void local maybeAddPred ( Cell,Int,Int,List ); +static List local calcFunDeps ( List ); +static Cell local copyAdj ( Cell,Int,Int ); +static Void local tidyDerInst ( Inst ); +static List local otvarsZonk ( Cell,List,Int ); + +static Void local addDerivImp ( Inst ); + +static Void local checkDefaultDefns ( Void ); + +static Void local checkForeignImport ( Name ); +static Void local checkForeignExport ( Name ); + +static Cell local tidyInfix ( Int,Cell ); +static Pair local attachFixity ( Int,Cell ); +static Syntax local lookupSyntax ( Text ); + +static Cell local checkPat ( Int,Cell ); +static Cell local checkMaybeCnkPat ( Int,Cell ); +static Cell local checkApPat ( Int,Int,Cell ); +static Void local addToPatVars ( Int,Cell ); +static Name local conDefined ( Int,Cell ); +static Void local checkIsCfun ( Int,Name ); +static Void local checkCfunArgs ( Int,Cell,Int ); +static Cell local checkPatType ( Int,String,Cell,Type ); +static Cell local applyBtyvs ( Cell ); +static Cell local bindPat ( Int,Cell ); +static Void local bindPats ( Int,List ); + +static List local extractSigdecls ( List ); +static List local extractFixdecls ( List ); +static List local extractBindings ( List ); +static List local getPatVars ( Int,Cell,List ); +static List local addPatVar ( Int,Cell,List ); +static List local eqnsToBindings ( List,List,List,List ); +static Void local notDefined ( Int,List,Cell ); +static Cell local findBinding ( Text,List ); +static Cell local getAttr ( List,Cell ); +static Void local addSigdecl ( List,Cell ); +static Void local addFixdecl ( List,List,List,List,Triple ); +static Void local dupFixity ( Int,Text ); +static Void local missFixity ( Int,Text ); + +static List local dependencyAnal ( List ); +static List local topDependAnal ( List ); +static Void local addDepField ( Cell ); +static Void local remDepField ( List ); +static Void local remDepField1 ( Cell ); +static Void local clearScope ( Void ); +static Void local withinScope ( List ); +static Void local leaveScope ( Void ); +static Void local saveSyntax ( Cell,Cell ); + +static Void local depBinding ( Cell ); +static Void local depDefaults ( Class ); +static Void local depInsts ( Inst ); +static Void local depClassBindings ( List ); +static Void local depAlt ( Cell ); +static Void local depRhs ( Cell ); +static Void local depGuard ( Cell ); +static Cell local depExpr ( Int,Cell ); +static Void local depPair ( Int,Cell ); +static Void local depTriple ( Int,Cell ); +static Void local depComp ( Int,Cell,List ); +static Void local depCaseAlt ( Int,Cell ); +static Cell local depVar ( Int,Cell ); +static Cell local depQVar ( Int,Cell ); +static Void local depConFlds ( Int,Cell,Bool ); +static Void local depUpdFlds ( Int,Cell ); +static List local depFields ( Int,Cell,List,Bool ); #if IPARAM -static Void local depWith Args((Int,Cell)); -static List local depDwFlds Args((Int,Cell,List)); +static Void local depWith ( Int,Cell ); +static List local depDwFlds ( Int,Cell,List ); #endif #if TREX -static Cell local depRecord Args((Int,Cell)); +static Cell local depRecord ( Int,Cell ); #endif -static List local tcscc Args((List,List)); -static List local bscc Args((List)); +static List local tcscc ( List,List ); +static List local bscc ( List ); -static Void local addRSsigdecls Args((Pair)); -static Void local allNoPrevDef Args((Cell)); -static Void local noPrevDef Args((Int,Cell)); -static Bool local odiff Args((List,List)); +static Void local addRSsigdecls ( Pair ); +static Void local allNoPrevDef ( Cell ); +static Void local noPrevDef ( Int,Cell ); +static Bool local odiff ( List,List ); -static Void local duplicateErrorAux Args((Int,Module,Text,String)); +static Void local duplicateErrorAux ( Int,Module,Text,String ); #define duplicateError(l,m,t,k) duplicateErrorAux(l,m,t,k) -static Void local checkTypeIn Args((Pair)); +static Void local checkTypeIn ( Pair ); /* -------------------------------------------------------------------------- * The code in this file is arranged in roughly the following order: @@ -5094,7 +5094,7 @@ Void checkDefns() { /* Top level static analysis */ mapProc(allNoPrevDef,valDefns); /* check against previous defns */ - if (!combined) linkPrimitiveNames(); /* link primitive names */ + if (!combined) linkPrimNames(); /* link primitive names */ mapProc(checkForeignImport,foreignImports); /* check foreign imports */ mapProc(checkForeignExport,foreignExports); /* check foreign exports */ diff --git a/ghc/interpreter/stg.c b/ghc/interpreter/stg.c index 5d5fb0d..1fb262c 100644 --- a/ghc/interpreter/stg.c +++ b/ghc/interpreter/stg.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: stg.c,v $ - * $Revision: 1.13 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.14 $ + * $Date: 2000/03/13 11:37:17 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -158,17 +158,16 @@ StgVar mkStgVar( StgRhs rhs, Cell info ) * Local functions * ------------------------------------------------------------------------*/ -static Void local pIndent Args((Int)); - -static Void local putStgVar Args((StgVar)); -static Void local putStgVars Args((List)); -static Void local putStgAtom Args((StgAtom a)); -static Void local putStgAtoms Args((List as)); -static Void local putStgBinds Args((List)); -static Void local putStgExpr Args((StgExpr)); -static Void local putStgRhs Args((StgRhs)); -static Void local putStgPat Args((StgCaseAlt)); -static Void local putStgPrimPat Args((StgPrimAlt)); +static Void local pIndent ( Int ); +static Void local putStgVar ( StgVar ); +static Void local putStgVars ( List ); +static Void local putStgAtom ( StgAtom a ); +static Void local putStgAtoms ( List as ); +static Void local putStgBinds ( List ); +static Void local putStgExpr ( StgExpr ); +static Void local putStgRhs ( StgRhs ); +static Void local putStgPat ( StgCaseAlt ); +static Void local putStgPrimPat ( StgPrimAlt ); diff --git a/ghc/interpreter/storage.c b/ghc/interpreter/storage.c index bcfe01c..6bb2306 100644 --- a/ghc/interpreter/storage.c +++ b/ghc/interpreter/storage.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: storage.c,v $ - * $Revision: 1.50 $ - * $Date: 2000/03/10 20:03:36 $ + * $Revision: 1.51 $ + * $Date: 2000/03/13 11:37:17 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -26,22 +26,21 @@ * local function prototypes: * ------------------------------------------------------------------------*/ -static Int local hash Args((String)); -static Int local saveText Args((Text)); -static Module local findQualifier Args((Text)); -static Void local hashTycon Args((Tycon)); -static List local insertTycon Args((Tycon,List)); -static Void local hashName Args((Name)); -static List local insertName Args((Name,List)); -static Void local patternError Args((String)); -static Bool local stringMatch Args((String,String)); -static Bool local typeInvolves Args((Type,Type)); -static Cell local markCell Args((Cell)); -static Void local markSnd Args((Cell)); -static Cell local lowLevelLastIn Args((Cell)); -static Cell local lowLevelLastOut Args((Cell)); - Module local moduleOfScript Args((Script)); - Script local scriptThisFile Args((Text)); +static Int local hash ( String ); +static Int local saveText ( Text ); +static Module local findQualifier ( Text ); +static Void local hashTycon ( Tycon ); +static List local insertTycon ( Tycon,List ); +static Void local hashName ( Name ); +static List local insertName ( Name,List ); +static Void local patternError ( String ); +static Bool local stringMatch ( String,String ); +static Bool local typeInvolves ( Type,Type ); +static Cell local markCell ( Cell ); +static Void local markSnd ( Cell ); +static Cell local lowLevelLastIn ( Cell ); +static Cell local lowLevelLastOut ( Cell ); + /* -------------------------------------------------------------------------- * Text storage: @@ -1130,7 +1129,7 @@ Inst newInst() { /* Add new instance to table */ } #ifdef DEBUG_DICTS -extern Void printInst Args((Inst)); +extern Void printInst ( Inst)); Void printInst(in) Inst in; { @@ -2129,10 +2128,8 @@ register Cell c; { * robust and can be used on any data structure irrespective of * its type. */ -Void print Args((Cell, Int)); -Void print(c, depth) -Cell c; -Int depth; { +Void print ( Cell c, Int depth ) +{ if (0 == depth) { Printf("..."); } else { @@ -3085,7 +3082,7 @@ void dumpInst ( Int i ) * ------------------------------------------------------------------------*/ #if DYN_TABLES -static void far* safeFarCalloc Args((Int,Int)); +static void far* safeFarCalloc ( Int,Int)); static void far* safeFarCalloc(n,s) /* allocate table storage and check*/ Int n, s; { /* for non-null return */ void far* tab = farCalloc(n,s); diff --git a/ghc/interpreter/storage.h b/ghc/interpreter/storage.h index 5111c8f..2001e12 100644 --- a/ghc/interpreter/storage.h +++ b/ghc/interpreter/storage.h @@ -10,8 +10,8 @@ * included in the distribution. * * $RCSfile: storage.h,v $ - * $Revision: 1.33 $ - * $Date: 2000/03/10 20:03:37 $ + * $Revision: 1.34 $ + * $Date: 2000/03/13 11:37:17 $ * ------------------------------------------------------------------------*/ /* -------------------------------------------------------------------------- @@ -58,21 +58,21 @@ typedef Cell ConVarId; * names, string literals, character constants etc... * ------------------------------------------------------------------------*/ -extern String textToStr Args((Text)); -extern Text findText Args((String)); -extern Text inventText Args((Void)); -extern Text inventDictText Args((Void)); -extern Bool inventedText Args((Text)); -extern Text enZcodeThenFindText Args((String)); -extern Text unZcodeThenFindText Args((String)); +extern String textToStr ( Text ); +extern Text findText ( String ); +extern Text inventText ( Void ); +extern Text inventDictText ( Void ); +extern Bool inventedText ( Text ); +extern Text enZcodeThenFindText ( String ); +extern Text unZcodeThenFindText ( String ); /* Variants of textToStr and syntaxOf which work for idents, ops whether * qualified or unqualified. */ -extern String identToStr Args((Cell)); -extern Text fixLitText Args((Text)); -extern Syntax identSyntax Args((Cell)); -extern Syntax defaultSyntax Args((Text)); +extern String identToStr ( Cell ); +extern Text fixLitText ( Text ); +extern Syntax identSyntax ( Cell ); +extern Syntax defaultSyntax ( Text ); /* -------------------------------------------------------------------------- * Specification of syntax (i.e. default written form of application) @@ -97,8 +97,8 @@ extern Syntax defaultSyntax Args((Text)); #define DEF_OPSYNTAX mkSyntax(DEF_ASS,DEF_PREC) #define NO_SYNTAX (-1) -extern Void addSyntax Args((Int,Text,Syntax)); -extern Syntax syntaxOf Args((Text)); +extern Void addSyntax ( Int,Text,Syntax ); +extern Syntax syntaxOf ( Text ); /* -------------------------------------------------------------------------- * Heap storage: @@ -118,20 +118,20 @@ extern Int cellsRecovered; /* cells recovered by last gc */ #define fst(c) heapTopFst[c] #define snd(c) heapTopSnd[c] -extern Pair pair Args((Cell,Cell)); -extern Void garbageCollect Args((Void)); +extern Pair pair ( Cell,Cell ); +extern Void garbageCollect ( Void ); -extern Void overwrite Args((Pair,Pair)); -extern Void overwrite2 Args((Pair,Cell,Cell)); -extern Cell markExpr Args((Cell)); -extern Void markWithoutMove Args((Cell)); +extern Void overwrite ( Pair,Pair ); +extern Void overwrite2 ( Pair,Cell,Cell ); +extern Cell markExpr ( Cell ); +extern Void markWithoutMove ( Cell ); #define mark(v) v=markExpr(v) #define isPair(c) ((c)<0) #define isGenPair(c) ((c)<0 && -heapSize<=(c)) -extern Cell whatIs Args((Cell)); +extern Cell whatIs ( Cell ); /* -------------------------------------------------------------------------- * Box cell tags are used as the fst element of a pair to indicate that @@ -198,15 +198,15 @@ extern Cell whatIs Args((Cell)); #define isIP(p) FALSE #endif -extern Bool isVar Args((Cell)); -extern Bool isCon Args((Cell)); -extern Bool isQVar Args((Cell)); -extern Bool isQCon Args((Cell)); -extern Bool isQualIdent Args((Cell)); +extern Bool isVar ( Cell ); +extern Bool isCon ( Cell ); +extern Bool isQVar ( Cell ); +extern Bool isQCon ( Cell ); +extern Bool isQualIdent ( Cell ); extern Bool eqQualIdent ( QualId c1, QualId c2 ); -extern Bool isIdent Args((Cell)); -extern String stringNegate Args((String)); -extern Text textOf Args((Cell)); +extern Bool isIdent ( Cell ); +extern String stringNegate ( String ); +extern Text textOf ( Cell ); #define isFloat(c) (isPair(c) && fst(c)==FLOATCELL) #define stringToFloat(s) pair(FLOATCELL,findText(s)) @@ -219,11 +219,11 @@ extern Text textOf Args((Cell)); #define bignumToString(b) textToStr(snd(b)) #define isPtr(c) (isPair(c) && fst(c)==PTRCELL) -extern Cell mkPtr Args((Ptr)); -extern Ptr ptrOf Args((Cell)); +extern Cell mkPtr ( Ptr ); +extern Ptr ptrOf ( Cell ); #define isCPtr(c) (isPair(c) && fst(c)==CPTRCELL) -extern Cell mkCPtr Args((Ptr)); -extern Ptr cptrOf Args((Cell)); +extern Cell mkCPtr ( Ptr ); +extern Ptr cptrOf ( Cell ); /* -------------------------------------------------------------------------- * Constructor cell tags are used as the fst element of a pair to indicate @@ -432,8 +432,8 @@ extern Ptr cptrOf Args((Cell)); * Tuple data/type constructors: * ------------------------------------------------------------------------*/ -extern Text ghcTupleText Args((Tycon)); -extern Text ghcTupleText_n Args((Int)); +extern Text ghcTupleText ( Tycon ); +extern Text ghcTupleText_n ( Int ); @@ -445,7 +445,7 @@ extern Text ghcTupleText_n Args((Int)); #define extRow(c) arg(c) extern Text DECTABLE(tabExt); -extern Ext mkExt Args((Text)); +extern Ext mkExt ( Text ); #else #define mkExt(t) NIL #endif @@ -522,18 +522,18 @@ struct Module { extern Module currentModule; /* Module currently being processed */ extern struct Module DECTABLE(tabModule); -extern Bool isValidModule Args((Module)); -extern Module newModule Args((Text)); -extern Module findModule Args((Text)); -extern Module findModid Args((Cell)); -extern Void setCurrModule Args((Module)); +extern Bool isValidModule ( Module ); +extern Module newModule ( Text ); +extern Module findModule ( Text ); +extern Module findModid ( Cell ); +extern Void setCurrModule ( Module ); -extern void addOTabName Args((Module,char*,void*)); -extern void* lookupOTabName Args((Module,char*)); -extern char* nameFromOPtr Args((void*)); +extern void addOTabName ( Module,char*,void* ); +extern void* lookupOTabName ( Module,char* ); +extern char* nameFromOPtr ( void* ); -extern void addSection Args((Module,void*,void*,OSectionKind)); -extern OSectionKind lookupSection Args((void*)); +extern void addSection ( Module,void*,void*,OSectionKind ); +extern OSectionKind lookupSection ( void* ); extern void* lookupOExtraTabName ( char* sym ); #define isPrelude(m) (m==modulePrelude) @@ -570,11 +570,11 @@ struct strTycon { extern struct strTycon DECTABLE(tabTycon); -extern Tycon newTycon Args((Text)); -extern Tycon findTycon Args((Text)); -extern Tycon addTycon Args((Tycon)); -extern Tycon findQualTycon Args((Cell)); -extern Tycon addPrimTycon Args((Text,Kind,Int,Cell,Cell)); +extern Tycon newTycon ( Text ); +extern Tycon findTycon ( Text ); +extern Tycon addTycon ( Tycon ); +extern Tycon findQualTycon ( Cell ); +extern Tycon addPrimTycon ( Text,Kind,Int,Cell,Cell ); #define isSynonym(h) (isTycon(h) && tycon(h).what==SYNONYM) #define isQualType(t) (isPair(t) && fst(t)==QUAL) @@ -613,7 +613,7 @@ struct strName { Name nextNameHash; }; -extern int numNames Args(( Void )); +extern int numNames ( Void ); extern struct strName DECTABLE(tabName); @@ -646,15 +646,15 @@ extern struct strName DECTABLE(tabName); #define mfunOf(n) ((-1)-name(n).number) #define mfunNo(i) ((-1)-(i)) -extern Name newName Args((Text,Cell)); -extern Name findName Args((Text)); -extern Name addName Args((Name)); -extern Name findQualName Args((Cell)); -extern Name addPrimCfun Args((Text,Int,Int,Cell)); -extern Name addPrimCfunREP Args((Text,Int,Int,Int)); -extern Int sfunPos Args((Name,Name)); -extern Name nameFromStgVar Args((Cell)); -extern Name jrsFindQualName Args((Text,Text)); +extern Name newName ( Text,Cell ); +extern Name findName ( Text ); +extern Name addName ( Name ); +extern Name findQualName ( Cell ); +extern Name addPrimCfun ( Text,Int,Int,Cell ); +extern Name addPrimCfunREP ( Text,Int,Int,Int ); +extern Int sfunPos ( Name,Name ); +extern Name nameFromStgVar ( Cell ); +extern Name jrsFindQualName ( Text,Text ); extern Name findQualNameWithoutConsultingExportList ( QualId q ); @@ -712,14 +712,14 @@ struct strClass { extern struct strClass DECTABLE(tabClass); extern struct strInst far *tabInst; -extern Class newClass Args((Text)); -extern Class classMax Args((Void)); -extern Class findClass Args((Text)); -extern Class addClass Args((Class)); -extern Class findQualClass Args((Cell)); -extern Inst newInst Args((Void)); -extern Inst findFirstInst Args((Tycon)); -extern Inst findNextInst Args((Tycon,Inst)); +extern Class newClass ( Text ); +extern Class classMax ( Void ); +extern Class findClass ( Text ); +extern Class addClass ( Class ); +extern Class findQualClass ( Cell ); +extern Inst newInst ( Void ); +extern Inst findFirstInst ( Tycon ); +extern Inst findNextInst ( Tycon,Inst ); extern List getAllKnownTyconsAndClasses ( void ); extern Class findQualClassWithoutConsultingExportList ( QualId q ); @@ -746,9 +746,9 @@ extern Class findQualClassWithoutConsultingExportList ( QualId q ); #define mkDigit(c) ((Cell)((c)+INTMIN)) #define digitOf(c) ((Int)((c)-INTMIN)) -extern Bool isInt Args((Cell)); -extern Int intOf Args((Cell)); -extern Cell mkInt Args((Int)); +extern Bool isInt ( Cell ); +extern Int intOf ( Cell ); +extern Cell mkInt ( Int ); /* -------------------------------------------------------------------------- * Implementation of triples: @@ -773,30 +773,30 @@ extern Cell mkInt Args((Int)); #define hd(c) fst(c) #define tl(c) snd(c) -extern Int length Args((List)); -extern List appendOnto Args((List,List)); /* destructive */ -extern List dupOnto Args((List,List)); -extern List dupList Args((List)); -extern List revOnto Args((List, List)); /* destructive */ +extern Int length ( List ); +extern List appendOnto ( List,List ); /* destructive */ +extern List dupOnto ( List,List ); +extern List dupList ( List ); +extern List revOnto ( List, List ); /* destructive */ #define rev(xs) revOnto((xs),NIL) /* destructive */ #define reverse(xs) revOnto(dupList(xs),NIL) /* non-destructive */ -extern Cell cellIsMember Args((Cell,List)); -extern Cell cellAssoc Args((Cell,List)); -extern Cell cellRevAssoc Args((Cell,List)); -extern Bool eqList Args((List,List)); -extern Cell varIsMember Args((Text,List)); -extern Name nameIsMember Args((Text,List)); +extern Cell cellIsMember ( Cell,List ); +extern Cell cellAssoc ( Cell,List ); +extern Cell cellRevAssoc ( Cell,List ); +extern Bool eqList ( List,List ); +extern Cell varIsMember ( Text,List ); +extern Name nameIsMember ( Text,List ); extern QualId qualidIsMember ( QualId, List ); -extern Cell intIsMember Args((Int,List)); -extern List replicate Args((Int,Cell)); -extern List diffList Args((List,List)); /* destructive */ -extern List deleteCell Args((List,Cell)); /* non-destructive */ -extern List take Args((Int,List)); /* destructive */ -extern List splitAt Args((Int,List)); /* non-destructive */ -extern Cell nth Args((Int,List)); -extern List removeCell Args((Cell,List)); /* destructive */ -extern List dupListOnto Args((List,List)); /* non-destructive */ -extern List nubList Args((List)); /* non-destructive */ +extern Cell intIsMember ( Int,List ); +extern List replicate ( Int,Cell ); +extern List diffList ( List,List ); /* destructive */ +extern List deleteCell ( List,Cell ); /* non-destructive */ +extern List take ( Int,List ); /* destructive */ +extern List splitAt ( Int,List ); /* non-destructive */ +extern Cell nth ( Int,List ); +extern List removeCell ( Cell,List ); /* destructive */ +extern List dupListOnto ( List,List ); /* non-destructive */ +extern List nubList ( List ); /* non-destructive */ /* The following macros provide `inline expansion' of some common ways of * traversing, using and modifying lists: @@ -885,12 +885,12 @@ extern Cell unap ( int tag, Cell c ); #define fun(c) fst(c) #define arg(c) snd(c) #define isAp(c) (isPair(c) && !isTag(fst(c))) -extern Cell getHead Args((Cell)); -extern List getArgs Args((Cell)); +extern Cell getHead ( Cell ); +extern List getArgs ( Cell ); extern Int argCount; -extern Cell nthArg Args((Int,Cell)); -extern Int numArgs Args((Cell)); -extern Cell applyToArgs Args((Cell,List)); +extern Cell nthArg ( Int,Cell ); +extern Int numArgs ( Cell ); +extern Cell applyToArgs ( Cell,List ); /* -------------------------------------------------------------------------- * Stack implementation: @@ -919,7 +919,7 @@ extern StackPtr sp; #define topfun(f) top()=ap((f),top()) #define toparg(x) top()=ap(top(),(x)) -extern Void hugsStackOverflow Args((Void)); +extern Void hugsStackOverflow ( Void ); #if SYMANTEC_C #include @@ -935,37 +935,38 @@ extern Void hugsStackOverflow Args((Void)); * The implementation of script file storage is hidden. * ------------------------------------------------------------------------*/ -extern Script startNewScript Args((String)); -extern Bool moduleThisScript Args((Module)); -extern Module moduleOfScript Args((Script)); -extern Bool isPreludeScript Args((Void)); -extern Module lastModule Args((Void)); -extern Script scriptThisFile Args((Text)); -extern Script scriptThisName Args((Name)); -extern Script scriptThisTycon Args((Tycon)); -extern Script scriptThisInst Args((Inst)); -extern Script scriptThisClass Args((Class)); -extern String fileOfModule Args((Module)); -extern Void dropScriptsFrom Args((Script)); +extern Script startNewScript ( String ); +extern Bool moduleThisScript ( Module ); +extern Module moduleOfScript ( Script ); +extern Bool isPreludeScript ( Void ); +extern Module lastModule ( Void ); +extern Script scriptThisFile ( Text ); +extern Script scriptThisName ( Name ); +extern Script scriptThisTycon ( Tycon ); +extern Script scriptThisInst ( Inst ); +extern Script scriptThisClass ( Class ); +extern String fileOfModule ( Module ); +extern Void dropScriptsFrom ( Script ); /* -------------------------------------------------------------------------- * Misc: * ------------------------------------------------------------------------*/ -extern Void setLastExpr Args((Cell)); -extern Cell getLastExpr Args((Void)); -extern List addTyconsMatching Args((String,List)); -extern List addNamesMatching Args((String,List)); - -extern Tycon findTyconInAnyModule ( Text t ); -extern Class findClassInAnyModule ( Text t ); -extern Name findNameInAnyModule ( Text t ); -extern Void print Args((Cell, Int)); -extern void dumpTycon ( Int t ); -extern void dumpName ( Int n ); -extern void dumpClass ( Int c ); -extern void dumpInst ( Int i ); -extern void locateSymbolByName ( Text t ); +extern Void setLastExpr ( Cell ); +extern Cell getLastExpr ( Void ); +extern List addTyconsMatching ( String,List ); +extern List addNamesMatching ( String,List ); + +extern Tycon findTyconInAnyModule ( Text t ); +extern Class findClassInAnyModule ( Text t ); +extern Name findNameInAnyModule ( Text t ); + +extern Void print ( Cell, Int ); +extern void dumpTycon ( Int t ); +extern void dumpName ( Int n ); +extern void dumpClass ( Int c ); +extern void dumpInst ( Int i ); +extern void locateSymbolByName ( Text t ); /*-------------------------------------------------------------------------*/ diff --git a/ghc/interpreter/subst.c b/ghc/interpreter/subst.c index 7ce2d40..39df63c 100644 --- a/ghc/interpreter/subst.c +++ b/ghc/interpreter/subst.c @@ -10,8 +10,8 @@ * included in the distribution. * * $RCSfile: subst.c,v $ - * $Revision: 1.13 $ - * $Date: 2000/03/10 20:03:37 $ + * $Revision: 1.14 $ + * $Date: 2000/03/13 11:37:17 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -43,38 +43,38 @@ List btyvars = NIL; /* explicitly scoped type vars */ * local function prototypes: * ------------------------------------------------------------------------*/ -static Void local expandSubst Args((Int)); -static Int local findBtyvsInt Args((Text)); -static Type local makeTupleType Args((Int)); -static Kind local makeSimpleKind Args((Int)); -static Kind local makeVarKind Args((Int)); -static Void local expandSyn1 Args((Tycon, Type *, Int *)); -static List local listTyvar Args((Int,List)); -static List local listTyvars Args((Type,Int,List)); -static Cell local dupTyvar Args((Int,List)); -static Cell local dupTyvars Args((Cell,Int,List)); -static Pair local copyNoMark Args((Cell,Int)); -static Type local dropRank1Body Args((Type,Int,Int)); -static Type local liftRank1Body Args((Type,Int)); -static Bool local matchTypeAbove Args((Type,Int,Type,Int,Int)); - -static Bool local varToVarBind Args((Tyvar *,Tyvar *)); -static Bool local varToTypeBind Args((Tyvar *,Type,Int)); +static Void local expandSubst ( Int ); +static Int local findBtyvsInt ( Text ); +static Type local makeTupleType ( Int ); +static Kind local makeSimpleKind ( Int ); +static Kind local makeVarKind ( Int ); +static Void local expandSyn1 ( Tycon, Type *, Int * ); +static List local listTyvar ( Int,List ); +static List local listTyvars ( Type,Int,List ); +static Cell local dupTyvar ( Int,List ); +static Cell local dupTyvars ( Cell,Int,List ); +static Pair local copyNoMark ( Cell,Int ); +static Type local dropRank1Body ( Type,Int,Int ); +static Type local liftRank1Body ( Type,Int ); +static Bool local matchTypeAbove ( Type,Int,Type,Int,Int ); + +static Bool local varToVarBind ( Tyvar *,Tyvar * ); +static Bool local varToTypeBind ( Tyvar *,Type,Int ); #if TREX -static Bool local inserter Args((Type,Int,Type,Int)); -static Int local remover Args((Text,Type,Int)); -static Int local tailVar Args((Type,Int)); +static Bool local inserter ( Type,Int,Type,Int ); +static Int local remover ( Text,Type,Int ); +static Int local tailVar ( Type,Int ); #endif -static Bool local improveAgainst Args((Int,List,Cell,Int)); -static Bool local instImprove Args((Int,Class,Cell,Int)); -static Bool local pairImprove Args((Int,Class,Cell,Int,Cell,Int,Int)); +static Bool local improveAgainst ( Int,List,Cell,Int ); +static Bool local instImprove ( Int,Class,Cell,Int ); +static Bool local pairImprove ( Int,Class,Cell,Int,Cell,Int,Int ); #if IPARAM -static Bool local ipImprove Args((Int,Cell,Int,Cell,Int)); +static Bool local ipImprove ( Int,Cell,Int,Cell,Int ); #endif -static Bool local kvarToVarBind Args((Tyvar *,Tyvar *)); -static Bool local kvarToTypeBind Args((Tyvar *,Type,Int)); +static Bool local kvarToVarBind ( Tyvar *,Tyvar * ); +static Bool local kvarToTypeBind ( Tyvar *,Type,Int ); /* -------------------------------------------------------------------------- * The substitution, types, and kinds: diff --git a/ghc/interpreter/translate.c b/ghc/interpreter/translate.c index 82fd389..a6935cb 100644 --- a/ghc/interpreter/translate.c +++ b/ghc/interpreter/translate.c @@ -10,8 +10,8 @@ * included in the distribution. * * $RCSfile: translate.c,v $ - * $Revision: 1.27 $ - * $Date: 2000/03/10 20:03:37 $ + * $Revision: 1.28 $ + * $Date: 2000/03/13 11:37:17 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -25,11 +25,11 @@ /* ---------------------------------------------------------------- */ -static StgVar local stgOffset Args((Offset,List)); -static StgVar local stgText Args((Text,List)); -static StgRhs local stgRhs Args((Cell,Int,List,StgExpr)); -static StgCaseAlt local stgCaseAlt Args((Cell,Int,List,StgExpr)); -static StgExpr local stgExpr Args((Cell,Int,List,StgExpr)); +static StgVar local stgOffset ( Offset,List ); +static StgVar local stgText ( Text,List ); +static StgRhs local stgRhs ( Cell,Int,List,StgExpr ); +static StgCaseAlt local stgCaseAlt ( Cell,Int,List,StgExpr ); +static StgExpr local stgExpr ( Cell,Int,List,StgExpr ); /* ---------------------------------------------------------------- */ @@ -37,9 +37,7 @@ static StgExpr local stgExpr Args((Cell,Int,List,StgExpr)); /* dictionaries, tuples, etc */ List stgGlobals = NIL; -static StgVar local getSTGTupleVar Args((Cell)); - -static StgVar local getSTGTupleVar( Cell d ) +static StgVar local getSTGTupleVar ( Cell d ) { Pair p = cellAssoc(d,stgGlobals); /* Yoiks - only the Prelude sees Tuple decls! */ diff --git a/ghc/interpreter/type.c b/ghc/interpreter/type.c index 81798d5..9b60662 100644 --- a/ghc/interpreter/type.c +++ b/ghc/interpreter/type.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: type.c,v $ - * $Revision: 1.29 $ - * $Date: 2000/03/10 20:03:37 $ + * $Revision: 1.30 $ + * $Date: 2000/03/13 11:37:17 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -31,77 +31,77 @@ * Local function prototypes: * ------------------------------------------------------------------------*/ -static Void local emptyAssumption Args((Void)); -static Void local enterBindings Args((Void)); -static Void local leaveBindings Args((Void)); -static Int local defType Args((Cell)); -static Type local useType Args((Cell)); -static Void local markAssumList Args((List)); -static Cell local findAssum Args((Text)); -static Pair local findInAssumList Args((Text,List)); -static List local intsIntersect Args((List,List)); -static List local genvarAllAss Args((List)); -static List local genvarAnyAss Args((List)); -static Int local newVarsBind Args((Cell)); -static Void local newDefnBind Args((Cell,Type)); - -static Void local enterPendingBtyvs Args((Void)); -static Void local leavePendingBtyvs Args((Void)); -static Cell local patBtyvs Args((Cell)); -static Void local doneBtyvs Args((Int)); -static Void local enterSkolVars Args((Void)); -static Void local leaveSkolVars Args((Int,Type,Int,Int)); - -static Void local typeError Args((Int,Cell,Cell,String,Type,Int)); -static Void local reportTypeError Args((Int,Cell,Cell,String,Type,Type)); -static Void local cantEstablish Args((Int,String,Cell,Type,List)); -static Void local tooGeneral Args((Int,Cell,Type,Type)); - -static Cell local typeExpr Args((Int,Cell)); - -static Cell local typeAp Args((Int,Cell)); -static Type local typeExpected Args((Int,String,Cell,Type,Int,Int,Bool)); -static Void local typeAlt Args((String,Cell,Cell,Type,Int,Int)); -static Int local funcType Args((Int)); -static Void local typeCase Args((Int,Int,Cell)); -static Void local typeComp Args((Int,Type,Cell,List)); -static Cell local typeMonadComp Args((Int,Cell)); -static Void local typeDo Args((Int,Cell)); -static Void local typeConFlds Args((Int,Cell)); -static Void local typeUpdFlds Args((Int,Cell)); +static Void local emptyAssumption ( Void ); +static Void local enterBindings ( Void ); +static Void local leaveBindings ( Void ); +static Int local defType ( Cell ); +static Type local useType ( Cell ); +static Void local markAssumList ( List ); +static Cell local findAssum ( Text ); +static Pair local findInAssumList ( Text,List ); +static List local intsIntersect ( List,List ); +static List local genvarAllAss ( List ); +static List local genvarAnyAss ( List ); +static Int local newVarsBind ( Cell ); +static Void local newDefnBind ( Cell,Type ); + +static Void local enterPendingBtyvs ( Void ); +static Void local leavePendingBtyvs ( Void ); +static Cell local patBtyvs ( Cell ); +static Void local doneBtyvs ( Int ); +static Void local enterSkolVars ( Void ); +static Void local leaveSkolVars ( Int,Type,Int,Int ); + +static Void local typeError ( Int,Cell,Cell,String,Type,Int ); +static Void local reportTypeError ( Int,Cell,Cell,String,Type,Type ); +static Void local cantEstablish ( Int,String,Cell,Type,List ); +static Void local tooGeneral ( Int,Cell,Type,Type ); + +static Cell local typeExpr ( Int,Cell ); + +static Cell local typeAp ( Int,Cell ); +static Type local typeExpected ( Int,String,Cell,Type,Int,Int,Bool ); +static Void local typeAlt ( String,Cell,Cell,Type,Int,Int ); +static Int local funcType ( Int ); +static Void local typeCase ( Int,Int,Cell ); +static Void local typeComp ( Int,Type,Cell,List ); +static Cell local typeMonadComp ( Int,Cell ); +static Void local typeDo ( Int,Cell ); +static Void local typeConFlds ( Int,Cell ); +static Void local typeUpdFlds ( Int,Cell ); #if IPARAM -static Cell local typeWith Args((Int,Cell)); +static Cell local typeWith ( Int,Cell ); #endif -static Cell local typeFreshPat Args((Int,Cell)); +static Cell local typeFreshPat ( Int,Cell ); -static Void local typeBindings Args((List)); -static Void local removeTypeSigs Args((Cell)); +static Void local typeBindings ( List ); +static Void local removeTypeSigs ( Cell ); -static Void local monorestrict Args((List)); -static Void local restrictedBindAss Args((Cell)); -static Void local restrictedAss Args((Int,Cell,Type)); +static Void local monorestrict ( List ); +static Void local restrictedBindAss ( Cell ); +static Void local restrictedAss ( Int,Cell,Type ); -static Void local unrestricted Args((List)); -static List local itbscc Args((List)); -static Void local addEvidParams Args((List,Cell)); +static Void local unrestricted ( List ); +static List local itbscc ( List ); +static Void local addEvidParams ( List,Cell ); -static Void local typeClassDefn Args((Class)); -static Void local typeInstDefn Args((Inst)); -static Void local typeMember Args((String,Name,Cell,List,Cell,Int)); +static Void local typeClassDefn ( Class ); +static Void local typeInstDefn ( Inst ); +static Void local typeMember ( String,Name,Cell,List,Cell,Int ); -static Void local typeBind Args((Cell)); -static Void local typeDefAlt Args((Int,Cell,Pair)); -static Cell local typeRhs Args((Cell)); -static Void local guardedType Args((Int,Cell)); +static Void local typeBind ( Cell ); +static Void local typeDefAlt ( Int,Cell,Pair ); +static Cell local typeRhs ( Cell ); +static Void local guardedType ( Int,Cell ); -static Void local genBind Args((List,Cell)); -static Void local genAss Args((Int,List,Cell,Type)); -static Type local genTest Args((Int,Cell,List,Type,Type,Int)); -static Type local generalize Args((List,Type)); -static Bool local equalTypes Args((Type,Type)); +static Void local genBind ( List,Cell ); +static Void local genAss ( Int,List,Cell,Type ); +static Type local genTest ( Int,Cell,List,Type,Type,Int ); +static Type local generalize ( List,Type ); +static Bool local equalTypes ( Type,Type ); -static Void local typeDefnGroup Args((List)); -static Pair local typeSel Args((Name)); +static Void local typeDefnGroup ( List ); +static Pair local typeSel ( Name ); @@ -541,7 +541,7 @@ Type dt, it; { static int tcMode = EXPRESSION; #ifdef DEBUG_TYPES -static Cell local mytypeExpr Args((Int,Cell)); +static Cell local mytypeExpr ( Int,Cell)); static Cell local typeExpr(l,e) Int l; Cell e; { @@ -2555,7 +2555,7 @@ Name s; { /* particular selector, s. */ * Local function prototypes: * ------------------------------------------------------------------------*/ -static Type local basicType Args((Char)); +static Type local basicType ( Char ); static Type stateVar = NIL; -- 1.7.10.4