Commit 36c0b5de authored by sewardj's avatar sewardj

[project @ 1999-11-01 11:01:11 by sewardj]

Fix codegen bug causing cg028.hs to fail.  namePmDouble was not bound
to anything, which caused translations of patterns containing doubles
to contain NILs.  Also bound namePmInteger since it didn't seem to be
bound to anything.
parent 1bdc7205
......@@ -1533,8 +1533,8 @@ primPmInt n x = fromInt n == x
primPmInteger :: Num a => Integer -> a -> Bool
primPmInteger n x = fromInteger n == x
primPmFlt :: Fractional a => Double -> a -> Bool
primPmFlt n x = fromDouble n == x
primPmDouble :: Fractional a => Double -> a -> Bool
primPmDouble n x = fromDouble n == x
-- ToDo: make the message more informative.
primPmFail :: a
......
......@@ -9,8 +9,8 @@
* included in the distribution.
*
* $RCSfile: link.c,v $
* $Revision: 1.10 $
* $Date: 1999/10/29 00:53:25 $
* $Revision: 1.11 $
* $Date: 1999/11/01 11:01:11 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
......@@ -102,9 +102,6 @@ Name namePmSub;
Name namePMFail;
Name nameEqChar;
Name nameEqInt;
#if !OVERLOADED_CONSTANTS
Name nameEqInteger;
#endif
Name nameEqDouble;
Name namePmInt;
Name namePmInteger;
......@@ -473,29 +470,28 @@ Void linkPreludeNames(void) { /* Hook to names defined in Prelude */
implementPrim(n);
}
nameRunST = linkName("primRunST");
nameRunST = linkName("primRunST");
/* static(tidyInfix) */
nameNegate = linkName("negate");
nameNegate = linkName("negate");
/* user interface */
nameRunIO = linkName("primRunIO");
namePrint = linkName("print");
nameRunIO = linkName("primRunIO");
namePrint = linkName("print");
/* desugar */
nameOtherwise = linkName("otherwise");
nameUndefined = linkName("undefined");
nameOtherwise = linkName("otherwise");
nameUndefined = linkName("undefined");
/* pmc */
#if NPLUSK
namePmSub = linkName("primPmSub");
namePmSub = linkName("primPmSub");
#endif
/* translator */
nameEqChar = linkName("primEqChar");
nameEqInt = linkName("primEqInt");
nameCreateAdjThunk = linkName("primCreateAdjThunk");
#if !OVERLOADED_CONSTANTS
nameEqInteger = linkName("primEqInteger");
#endif /* !OVERLOADED_CONSTANTS */
nameEqDouble = linkName("primEqDouble");
namePmInt = linkName("primPmInt");
nameEqChar = linkName("primEqChar");
nameEqInt = linkName("primEqInt");
nameCreateAdjThunk = linkName("primCreateAdjThunk");
nameEqDouble = linkName("primEqDouble");
namePmInt = linkName("primPmInt");
namePmInteger = linkName("primPmInteger");
namePmDouble = linkName("primPmDouble");
name(namePmInt).inlineMe = TRUE;
}
}
......
......@@ -1533,8 +1533,8 @@ primPmInt n x = fromInt n == x
primPmInteger :: Num a => Integer -> a -> Bool
primPmInteger n x = fromInteger n == x
primPmFlt :: Fractional a => Double -> a -> Bool
primPmFlt n x = fromDouble n == x
primPmDouble :: Fractional a => Double -> a -> Bool
primPmDouble n x = fromDouble n == x
-- ToDo: make the message more informative.
primPmFail :: a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment