summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/integer/IntegerConversionRules.hs
blob: cb5269f3606e1e55f1e664378f58133bd71f678c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

module IntegerConversionRules where

import Data.Word

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