Commit 8eda4709 authored by simonmar's avatar simonmar

[project @ 2001-04-03 15:05:52 by simonmar]

Move the RULES for intToInt32# and wordToWord32# to PrelBase, so that
PrelInt and PrelWord are no longer orphan modules.
parent 8b2dda50
% ----------------------------------------------------------------------------- % -----------------------------------------------------------------------------
% $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 % (c) The University of Glasgow, 1992-2000
% %
...@@ -630,6 +630,13 @@ gtInt, geInt, eqInt, neInt, ltInt, leInt :: Int -> Int -> Bool ...@@ -630,6 +630,13 @@ gtInt, geInt, eqInt, neInt, ltInt, leInt :: Int -> Int -> Bool
(I# x) `ltInt` (I# y) = x <# y (I# x) `ltInt` (I# y) = x <# y
(I# x) `leInt` (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 {-# RULES
"int2Word2Int" forall x#. int2Word# (word2Int# x#) = x# "int2Word2Int" forall x#. int2Word# (word2Int# x#) = x#
"word2Int2Word" forall x#. word2Int# (int2Word# x#) = x# "word2Int2Word" forall x#. word2Int# (int2Word# x#) = x#
......
...@@ -241,10 +241,6 @@ instance Bits Int16 where ...@@ -241,10 +241,6 @@ instance Bits Int16 where
data Int32 = I32# Int# deriving (Eq, Ord) 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 CCallable Int32
instance CReturnable Int32 instance CReturnable Int32
......
...@@ -380,10 +380,6 @@ instance Bits Word16 where ...@@ -380,10 +380,6 @@ instance Bits Word16 where
data Word32 = W32# Word# deriving (Eq, Ord) 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 CCallable Word32
instance CReturnable Word32 instance CReturnable Word32
......
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