
9 May
2008
9 May
'08
10:08 p.m.
On 2008 May 9, at 17:07, PR Stanley wrote:
I thought [1, 2, 3] :: [Int] GHC says it's (Num t) > [t] Okay, when it comes to 3.3:[1,2,3] (Num t) => [t] makes more sense. Is that the only reason?
The Haskell 98 standard says that numeric literals are of type Num t => t (so you don't need to fromIntegral everything that looks like an Int but is used with e.g. Doubles). Therefore a list of them is Num t => [t]. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH