Follow changes in comparison primops (see #6135)
[ghc.git] / testsuite / tests / primops / should_compile / T6135_should_compile.hs
1 -- Tests created by Jan Stolarek <jan.stolarek@p.lodz.pl>
2
3 {-# LANGUAGE MagicHash #-}
4 module Main where
5
6 import GHC.Exts
7
8 main :: IO ()
9 main = do
10 print (h 3.0##)
11 print g
12 print 3.14159
13
14 h :: Double# -> String
15 h n = if tagToEnum# (n ==## 3.0##) || tagToEnum# (n ==## 4.0##)
16 then "First branch"
17 else "Second branch"
18
19 g :: String
20 g = if ((fromInteger 1 :: Integer) == 1)
21 then "First branch"
22 else "Second branch"