[project @ 2001-08-20 14:18:30 by simonpj]
authorsimonpj <unknown>
Mon, 20 Aug 2001 14:18:30 +0000 (14:18 +0000)
committersimonpj <unknown>
Mon, 20 Aug 2001 14:18:30 +0000 (14:18 +0000)
Amplify comment on mkMachInt a little

ghc/compiler/basicTypes/Literal.lhs

index 3555d31..7df6fca 100644 (file)
@@ -147,7 +147,10 @@ instance Ord Literal where
 mkMachInt, mkMachWord, mkMachInt64, mkMachWord64 :: Integer -> Literal
 
 mkMachInt  x   = -- ASSERT2( inIntRange x,  integer x ) 
-                -- not true: you can write out of range Int# literals
+                -- Not true: you can write out of range Int# literals
+                -- For example, one can write (intToWord# 0xffff0000) to
+                -- get a particular Word bit-pattern, and there's no other
+                -- convenient way to write such literals, which is why we allow it.
                 MachInt x
 mkMachWord x   = -- ASSERT2( inWordRange x, integer x ) 
                 MachWord x