Skip to content

Incorrect Type Inference?

If the function 

func1 = \x -> map (*x)

is saved into a file, and then imported to ghci 
(v6.4, windows), the type becomes 

Integer -> [Integer] -> [Integer]


However, if I do 

:t \x -> map (*x)

the result is:

\x -> map (*x) :: (Num a) => a -> [a] -> [a]

which seems correct.
Trac metadata
Trac field Value
Version 6.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedInvalid
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information