Clear up confusion regarding names of tuple types.
-- (), coded as Z0T, is the unit.
-- (,), coded as Z1T, is the pair type.
-- (,,,N commas,,,) coded as ZNT, is the (N+1)-tuple type.
-- There is no 1-ary type type.
* included in the distribution.
*
* $RCSfile: link.c,v $
* included in the distribution.
*
* $RCSfile: link.c,v $
- * $Revision: 1.36 $
- * $Date: 2000/01/12 10:44:50 $
+ * $Revision: 1.37 $
+ * $Date: 2000/01/12 14:52:53 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
* ------------------------------------------------------------------------*/
#include "prelude.h"
*/
name(namePrimTakeMVar).type = primType(MONAD_Id, "rbc", "d");
*/
name(namePrimTakeMVar).type = primType(MONAD_Id, "rbc", "d");
- 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);
- }
+ 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);
+ }
nameInRange = linkName("inRange");
nameMinus = linkName("-");
/* These come before calls to implementPrim */
nameInRange = linkName("inRange");
nameMinus = linkName("-");
/* These come before calls to implementPrim */
- if (combined) {
- for(i=0; i<NUM_TUPLES; ++i) {
- implementTuple(i);
- }
+ if (!combined) {
+ for(i=0; i<NUM_TUPLES; ++i) {
+ if (i != 1) implementTuple(i);
+ }
= addWiredInBoxingTycon("PrelGHC","ByteArray","PrimByteArray#",0 ,STAR );
for (i=0; i<NUM_TUPLES; ++i) {
= addWiredInBoxingTycon("PrelGHC","ByteArray","PrimByteArray#",0 ,STAR );
for (i=0; i<NUM_TUPLES; ++i) {
+ if (i != 1) addTupleTycon(i);
}
addWiredInEnumTycon("PrelBase","Bool",
doubleton(findText("False"),findText("True")));
}
addWiredInEnumTycon("PrelBase","Bool",
doubleton(findText("False"),findText("True")));
setCurrModule(modulePrelude);
for (i=0; i<NUM_TUPLES; ++i) {
setCurrModule(modulePrelude);
for (i=0; i<NUM_TUPLES; ++i) {
+ if (i != 1) addTupleTycon(i);
}
setCurrModule(modulePrelude);
}
setCurrModule(modulePrelude);
* included in the distribution.
*
* $RCSfile: storage.c,v $
* included in the distribution.
*
* $RCSfile: storage.c,v $
- * $Revision: 1.39 $
- * $Date: 2000/01/11 17:23:39 $
+ * $Revision: 1.40 $
+ * $Date: 2000/01/12 14:52:53 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
* ------------------------------------------------------------------------*/
#include "prelude.h"
Text ghcTupleText_n ( Int n )
{
Text ghcTupleText_n ( Int n )
{
char buf[104];
if (n < 0 || n >= 100) internal("ghcTupleText_n");
char buf[104];
if (n < 0 || n >= 100) internal("ghcTupleText_n");
- buf[0] = '(';
- for (i = 1; i <= n; i++) buf[i] = ',';
- buf[n+1] = ')';
- buf[n+2] = 0;
+ if (n == 1) internal("ghcTupleText_n==1");
+ buf[x++] = '(';
+ for (i = 1; i <= n-1; i++) buf[x++] = ',';
+ buf[x++] = ')';
+ buf[x++] = 0;
* included in the distribution.
*
* $RCSfile: type.c,v $
* included in the distribution.
*
* $RCSfile: type.c,v $
- * $Revision: 1.21 $
- * $Date: 2000/01/07 17:49:29 $
+ * $Revision: 1.22 $
+ * $Date: 2000/01/12 14:52:54 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
* ------------------------------------------------------------------------*/
#include "prelude.h"
starToStar = simpleKind(1);
starToStar = simpleKind(1);
- typeUnit = //addPrimTycon(findText("()"),
- // STAR,0,DATATYPE,NIL);
- findTycon(findText("()"));
+ typeUnit = findTycon(findText("()"));
assert(nonNull(typeUnit));
typeArrow = addPrimTycon(findText("(->)"),
assert(nonNull(typeUnit));
typeArrow = addPrimTycon(findText("(->)"),