logo       

[ ghc-Bugs-1184340 ] Incorrect Type Inference?: msg#00077

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-1184340 ] Incorrect Type Inference?

Bugs item #1184340, was opened at 2005-04-16 10:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1184340&group_id=8032

Category: GHCi
Group: 6.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Incorrect Type Inference?

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1184340&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise