summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric/should_compile/T19892.hs
blob: cd8d9018b8df19f895b809812bb0068352630a94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE MagicHash #-}

module T19892 where

import GHC.Exts
import GHC.Num.Integer
import GHC.Num.Natural

foo :: Word# -> Word#
foo x = integerToWord# (IS (word2Int# x))

bar :: Int# -> Int#
bar x = integerToInt# (IS x)

baz :: Word# -> Word#
baz x = naturalToWord# (NS x)