The best way to get h [0..7] is to copy the hexadecimal constants from the Wikipedia page. So you know that you will have the right ones.
But if you really want to calculate them:
scaledFrac :: Integer -> Integer scaledFrac x = let s = sqrt (fromIntegral x) :: Double in floor ((s - fromInteger (floor s)) * 2^32) [ printf "%x" (scaledFrac i) | i <- [2,3,5,7,11,13,17,19] ]
source share