Given this line of code (which I first saw in this answer):
pVal :: Num a => a
pVal = sum . map fromIntegral $ ([1..10000000] :: [Int])
If it's used as multiple types, is the expression completely reevaluated for each type? Is one result for each type kept around?
For example:
pInt :: Int
pInt = pVal
pDub :: Double
pDub = pVal