[project @ 1999-11-01 11:01:11 by sewardj]
authorsewardj <unknown>
Mon, 1 Nov 1999 11:01:13 +0000 (11:01 +0000)
committersewardj <unknown>
Mon, 1 Nov 1999 11:01:13 +0000 (11:01 +0000)
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.

ghc/interpreter/lib/Prelude.hs
ghc/interpreter/link.c
ghc/lib/hugs/Prelude.hs

index bd7374f..1533c07 100644 (file)
@@ -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
index e9fb95f..ff18e6e 100644 (file)
@@ -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;
     }
 }
index bd7374f..1533c07 100644 (file)
@@ -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