blob: bb9035a6aec4a6f4f934d6880641a8ffb75e5416 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE MagicHash #-}
module T7287 where
import GHC.Prim
{-# RULES
"int2Word#/word2Int#" forall x. int2Word# (word2Int# x) = x
#-}
{- We get a legitimate
T7287.hs:7:3: warning:
Rule int2Word#/word2Int# may never fire because
rule "word2Int#" for ‘word2Int#’ might fire first
Probable fix: add phase [n] or [~n] to the competing rule
because rule "word2Int#" is the constant folding rule that converts
a sufficiently-narrow Word# literal to an Int#. There is a similar
one for int2Word#, so the whole lot is confluent. -}
|