
On Apr 30, 2009, at 09:52 , Jan Jakubuv wrote:
*Main> :t nonsense nonsense :: (SUBST s) => t -> Maybe s
But, when I put this signature into the code (that is, when the commented line above is uncommented) then type checking fails with the following error:
Ambiguous type variable `s' in the constraint: `SUBST s'
http://www.haskell.org/pipermail/haskell-cafe/2008-April/041397.html http://hackage.haskell.org/trac/ghc/ticket/1897 The type really is ambiguous according to GHC's rules, because you're missing some relationships. As I understand it (which may well be wrong), f you leave off the explicit typing it will successfully infer everything including the missing relationship; but if you explicitly type it you prevent inference of the missing relationship. -- 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