Inferred type is less polymorphic than expected?

Simon Peyton-Jones simonpj at microsoft.com
Mon Aug 8 03:43:35 EDT 2005


| > Are you saying, that the second error causes the first one? Thus,
| > everything is caused by 'printer' being recursively defined?
| Yes, that's what I believe. I'm not sure why it shows the first error
| message at all; in my experience, strange things happen when ghc
| continues after an error message that you shouldn't pay too much
| attention to. Perhaps ghc-6.4 just assumes identical contexts in
| recursive groups without checking the type signatures.

After an error in a function definition for f, GHC carries on assuming the function has type 

	f :: forall a. a

That very seldom leads to subsequent errors, but maybe it did this time.  The way to find out is to show the program that elicits this message but not the other.

Simon


More information about the Glasgow-haskell-users mailing list