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