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 BoolSo 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] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe