id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
3517	GHC has lots of extra hidden IOErrorType values	duncan		"I was fixing bytestring's hGet (see #3514) and I discover that I cannot produce the same exception as System.IO.hGet does in the same circumstance.

There are two problems:

One is that GHC's internal IOError has more information than one can set via System.IO.Error.mkIOError. In particular it has a function name.

The other is that System.IO.hGet throws an `InvalidArgument` `IOErrorType`, however this is not exported and there are no smart constructors or testers for this error type. This is problematic for two reasons, portable code cannot generate these error types to mirror the standard System.IO and secondly no code can actually catch these errors except in a general ""catch all"" style because they cannot be distinguished from each other.

Code that wants to mirror System.IO (like bytestring or utf8-string) has to import GHC.IO.Exception and use cpp to do it differently for hugs and nhc."	bug	new	low	7.6.2	libraries/base					Unknown/Multiple	Unknown/Multiple	None/Unknown	Unknown				
