# --------------------------------------------------------------------------- #
-# $Id: Makefile,v 1.20 1999/11/22 16:44:32 sewardj Exp $ #
+# $Id: Makefile,v 1.21 1999/11/23 18:08:17 sewardj Exp $ #
# --------------------------------------------------------------------------- #
TOP = ..
endif
ifeq "$(HaveLibReadline)$" "YES"
-LIB_READLINE=-lreadline
+LIB_READLINE=-lreadline -ltermcap
else
LIB_READLINE=
endif
return a
-- The following primitives are only needed if (n+k) patterns are enabled:
-primPmNpk :: Integral a => Int -> a -> Maybe a
-primPmNpk n x = if n'<=x then Just (x-n') else Nothing
- where n' = fromInt n
+primPmSub :: Integral a => Int -> a -> a
+primPmSub n x = x - fromInt n
-primPmSub :: Integral a => Int -> a -> a
-primPmSub n x = x - fromInt n
+primPmFromInteger :: Integral a => Integer -> a
+primPmFromInteger = fromIntegral
+
+primPmSubtract :: Integral a => a -> a -> a
+primPmSubtract x y = x - y
+
+primPmLe :: Integral a => a -> a -> Bool
+primPmLe x y = x <= y
-- Unpack strings generated by the Hugs code generator.
-- Strings can contain \0 provided they're coded right.
* included in the distribution.
*
* $RCSfile: lift.c,v $
- * $Revision: 1.7 $
- * $Date: 1999/11/12 17:32:40 $
+ * $Revision: 1.8 $
+ * $Date: 1999/11/23 18:08:17 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
for(bs=binds; nonNull(bs); bs=tl(bs)) {
StgVar bind = hd(bs);
+#if 0
+ fprintf(stderr, "\n");
+ if (lastModule() != modulePrelude) ppStg(hd(bs));
+ fprintf(stderr, "\n");
+#endif
freeVarsBind(NIL,bind);
stgVarInfo(bind) = NONE; /* mark as top level */
}
* included in the distribution.
*
* $RCSfile: link.c,v $
- * $Revision: 1.17 $
- * $Date: 1999/11/23 15:12:08 $
+ * $Revision: 1.18 $
+ * $Date: 1999/11/23 18:08:17 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
namePmInt = linkName("primPmInt");
namePmInteger = linkName("primPmInteger");
namePmDouble = linkName("primPmDouble");
+
+ namePmFromInteger = linkName("primPmFromInteger");
+ namePmSubtract = linkName("primPmSubtract");
+ namePmLe = linkName("primPmLe");
}
}
* included in the distribution.
*
* $RCSfile: machdep.c,v $
- * $Revision: 1.10 $
- * $Date: 1999/11/17 16:57:41 $
+ * $Revision: 1.11 $
+ * $Date: 1999/11/23 18:08:18 $
* ------------------------------------------------------------------------*/
#ifdef HAVE_SIGNAL_H
Int nPath;
Bool literate;
String peStart, peEnd;
- String augdPath; /* .:defaultLibDir:hugsPath */
+ String augdPath; /* .:hugsPath:defaultLibDir */
*path = *sExt = NULL;
*sAvail = *iAvail = *oAvail = FALSE;
augdPath[0] = '.';
augdPath[1] = PATHSEP;
augdPath[2] = 0;
- strcat ( augdPath, defaultLibDir );
- augdPath[2+strlen(defaultLibDir)] = PATHSEP;
- augdPath[3+strlen(defaultLibDir)] = 0;
- strcat(augdPath,hugsPath);
+ strcat ( augdPath, hugsPath );
+ augdPath[2+strlen(hugsPath)] = PATHSEP;
+ augdPath[3+strlen(hugsPath)] = 0;
+ strcat(augdPath,defaultLibDir);
peEnd = augdPath-1;
while (1) {
* included in the distribution.
*
* $RCSfile: translate.c,v $
- * $Revision: 1.18 $
- * $Date: 1999/11/23 09:48:46 $
+ * $Revision: 1.19 $
+ * $Date: 1999/11/23 18:08:19 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
Cell scrut = stgOffset(o,sc);
Cell h = getHead(discr);
Int da = discrArity(discr);
+ char str[30];
#if NPLUSK
if (whatIs(h) == ADDPAT && argCount == 1) {
dIntegral = mkStgVar(dIntegral,NIL);
binds = cons(dIntegral,binds);
}
+
/* box number */
- n = mkStgVar(mkStgCon(nameMkInteger,singleton(n)),NIL);
+ sprintf(str, "%d", n);
+ n = mkStgVar(mkStgCon(nameMkInteger,singleton(stringToBignum(str))),NIL);
binds = cons(n,binds);
/* coerce number to right type (using Integral dict) */
return a
-- The following primitives are only needed if (n+k) patterns are enabled:
-primPmNpk :: Integral a => Int -> a -> Maybe a
-primPmNpk n x = if n'<=x then Just (x-n') else Nothing
- where n' = fromInt n
+primPmSub :: Integral a => Int -> a -> a
+primPmSub n x = x - fromInt n
-primPmSub :: Integral a => Int -> a -> a
-primPmSub n x = x - fromInt n
+primPmFromInteger :: Integral a => Integer -> a
+primPmFromInteger = fromIntegral
+
+primPmSubtract :: Integral a => a -> a -> a
+primPmSubtract x y = x - y
+
+primPmLe :: Integral a => a -> a -> Bool
+primPmLe x y = x <= y
-- Unpack strings generated by the Hugs code generator.
-- Strings can contain \0 provided they're coded right.