
On Jun 22, 2009, at 20:02 , Eric wrote:
Non type-variable argument in the constraint: MonadState [a] m (Use -XFlexibleContexts to permit this) In the type signature for `play3': play3 :: (MonadState [a] m, Eq a) => a -> m Bool
So how is it possible that GHCi can infer (and use) a type that you cannot use as signature?
This is an infelicity in the GHC type checker: if a library uses an extension, inferred types involving things in the library will silently use the extension even though you haven't declared it --- but if you try to specify the type manually, you have to explicitly declare the extension. I think there's a bug report open on it, because it's poor form (not to mention confusing). http://hackage.haskell.org/trac/ghc/ticket/1897 I think this is the right bug. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH