X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Finterpreter%2Flink.c;h=5d8e40b5a3b3c27b7c5459b901aea1d8e346ea87;hb=b034fbda464c20850831fc6f8b0c706b2afe34bd;hp=456adf2626134bbef4edfd0d5da4b5a6f32df0c3;hpb=810bbf81f6446cf6770a1de6a8b2e970fb69fec8;p=ghc-hetmet.git diff --git a/ghc/interpreter/link.c b/ghc/interpreter/link.c index 456adf2..5d8e40b 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.30 $ - * $Date: 2000/01/10 17:06:41 $ + * $Revision: 1.37 $ + * $Date: 2000/01/12 14:52:53 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -89,6 +89,8 @@ Name nameBind; /* for translating monad comps */ Name nameZero; /* for monads with a zero */ Name nameId; +Name nameShow; +Name namePutStr; Name nameRunIO_toplevel; Name namePrint; @@ -331,7 +333,8 @@ Void linkPreludeTC(void) { /* Hook to tycons and classes in */ classFloating = linkClass("Floating"); classNum = linkClass("Num"); classMonad = linkClass("Monad"); - +assert(nonNull(typeDouble)); +assert(nonNull(typeInteger)); stdDefaults = NIL; stdDefaults = cons(typeDouble,stdDefaults); # if DEFAULT_BIGNUM @@ -378,13 +381,15 @@ Void linkPreludeTC(void) { /* Hook to tycons and classes in */ */ name(namePrimTakeMVar).type = primType(MONAD_Id, "rbc", "d"); - for (i=2; i<=NUM_DTUPLES; i++) {/* Add derived instances of tuples */ - addTupInst(classEq,i); - addTupInst(classOrd,i); - addTupInst(classIx,i); - addTupInst(classShow,i); - addTupInst(classRead,i); - addTupInst(classBounded,i); + if (!combined) { + for (i=2; i<=NUM_DTUPLES; i++) {/* Add derived instances of tuples */ + addTupInst(classEq,i); + addTupInst(classOrd,i); + addTupInst(classIx,i); + addTupInst(classShow,i); + addTupInst(classRead,i); + addTupInst(classBounded,i); + } } } } @@ -424,8 +429,10 @@ Void linkPreludeCM(void) { /* Hook to cfuns and mfuns in */ nameInRange = linkName("inRange"); nameMinus = linkName("-"); /* These come before calls to implementPrim */ - for(i=0; i)"), pair(STAR,pair(STAR,STAR)), 2,DATATYPE,NIL); + + pFun(nameInd, "_indirect"); + name(nameInd).number = DFUNNAME; + } else { modulePrelude = newModule(textPrelude); setCurrModule(modulePrelude); for (i=0; i