summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/T7361.hs
blob: 81301e4c23ec53ced9901247372078679ff346ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE MagicHash #-}
import GHC.Exts

main = print $ map f [1,256,65536,minBound,maxBound]

f (I# x#) =
      [ I# (narrow8Int#  (narrow16Int# x#))
      , I# (narrow8Int#  (narrow32Int# x#))
      , I# (narrow16Int# (narrow8Int#  x#))
      , I# (narrow16Int# (narrow32Int# x#))
      , I# (narrow32Int# (narrow8Int#  x#))
      , I# (narrow32Int# (narrow16Int# x#))]