id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
1310	confusing error message when trying to give a type-signature to an imported symbol	Isaac Dupree		"{{{
import Prelude(putStrLn,String,IO)
main = putStrLn ""ha"" --works fine; putStrLn _is_ in (this) scope
}}}
{{{
putStrLn :: String -> IO () --produces ghc error: Not in scope: `putStrLn'
}}}
{{{
Prelude.putStrLn :: String -> IO () --produces ghc error: Invalid type signature
}}}

I think an error message more like ""type signatures can't be given to functions(or non-function data) not defined in the same module"" in both cases would be clearer.  Not sure what the right phrase is for ""functions(or non-function data)"", ""symbols"",?

{{{
main = putStrLn ""ha""
    where p :: String -> IO ()
p x = putStrLn x
--produces ghc error: Misplaced type signature: p :: String -> IO ()
}}}
which shows a little more understanding in that case... If someone didn't understand how that style of type-signature could only appear parallel to a definition, I'm not sure how helpful it is.

{{{
main = putStrLn ""ha""
    where putStrLn :: String -> IO ()
--produces ghc error for the second line: Not in scope: `putStrLn'
}}}"	bug	closed	normal		Compiler	6.6.1	fixed			Unknown/Multiple	Unknown/Multiple		Unknown				
