do's and error messages

2001-07-16 Thread George Russell
If you have a type error message at the very start of a do statement, the result can be rather confusing, because the typechecker doesn't know that do's are almost always have type (IO (something)) and so tries to shoehorn the monad to fit the type. This has actually happened to me several

RE: do's and error messages

2001-07-16 Thread Simon Peyton-Jones
| -Original Message- | From: George Russell [mailto:[EMAIL PROTECTED]] | Sent: 16 July 2001 15:56 | To: [EMAIL PROTECTED] | Subject: do's and error messages | | | If you have a type error message at the very start of a do | statement, the result can be rather confusing, because

Re: do's and error messages

2001-07-16 Thread Ken Shan
On 2001-07-16T09:48:46-0700, Simon Peyton-Jones wrote: Here's an example: f x = do { c ; putStrLn x; return () } Would asIO :: IO a - IO a asIO = id help here? -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig See the sun in the midst of the rain.