summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/integer/IntegerConversionRules.hs
blob: 56949e7bf1b705e77f11c776f1dff9a5321f56d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# LANGUAGE CPP #-}

module IntegerConversionRules where

#if __GLASGOW_HASKELL__ < 709
import Data.Word (Word)
#endif

f1 :: Int -> Double
f1 = fi

f2 :: Int -> Float
f2 = fi

f3 :: Int -> Int
f3 = fi

f4 :: Int -> Word
f4 = fi

fi :: (Integral a, Num b) => a -> b
fi = fromIntegral