[project @ 2001-04-03 15:05:52 by simonmar]
authorsimonmar <unknown>
Tue, 3 Apr 2001 15:05:53 +0000 (15:05 +0000)
committersimonmar <unknown>
Tue, 3 Apr 2001 15:05:53 +0000 (15:05 +0000)
Move the RULES for intToInt32# and wordToWord32# to PrelBase, so that
PrelInt and PrelWord are no longer orphan modules.

ghc/lib/std/PrelBase.lhs
ghc/lib/std/PrelInt.lhs
ghc/lib/std/PrelWord.lhs

index 2026a35..fde9554 100644 (file)
@@ -1,5 +1,5 @@
 % -----------------------------------------------------------------------------
-% $Id: PrelBase.lhs,v 1.43 2001/03/01 09:23:40 qrczak Exp $
+% $Id: PrelBase.lhs,v 1.44 2001/04/03 15:05:52 simonmar Exp $
 %
 % (c) The University of Glasgow, 1992-2000
 %
@@ -630,6 +630,13 @@ gtInt, geInt, eqInt, neInt, ltInt, leInt :: Int -> Int -> Bool
 (I# x) `ltInt` (I# y) = x <#  y
 (I# x) `leInt` (I# y) = x <=# y
 
+#if WORD_SIZE_IN_BYTES == 4
+{-# RULES
+"intToInt32#" forall x#. intToInt32# x# = x#
+"wordToWord32#" forall x#. wordToWord32# x# = x#
+     #-}
+#endif
+
 {-# RULES
 "int2Word2Int"  forall x#. int2Word# (word2Int# x#) = x#
 "word2Int2Word" forall x#. word2Int# (int2Word# x#) = x#
index 728f262..c1ea194 100644 (file)
@@ -241,10 +241,6 @@ instance Bits Int16 where
 
 data Int32 = I32# Int# deriving (Eq, Ord)
 
-#if WORD_SIZE_IN_BYTES == 4
-{-# RULES "intToInt32#" forall x#. intToInt32# x# = x# #-}
-#endif
-
 instance CCallable Int32
 instance CReturnable Int32
 
index f5f0d99..63d8cc8 100644 (file)
@@ -380,10 +380,6 @@ instance Bits Word16 where
 
 data Word32 = W32# Word# deriving (Eq, Ord)
 
-#if WORD_SIZE_IN_BYTES == 4
-{-# RULES "wordToWord32#" forall x#. wordToWord32# x# = x# #-}
-#endif
-
 instance CCallable Word32
 instance CReturnable Word32