Why does GHC infer a monomorphic type here, even with MonomorphismRestriction disabled?
This was prompted by Resolving the type of `f = f (<*>) pure` , which discusses a more complicated example, but this one works too. The following definition compiles without problem: w :: Integral a => a w = fromInteger w ...Of course it doesn't work runtime-wise, but that's beside the question. The point is that the definition of w itself uses a specialised version of w :: Integer . Clearly that is a suitable instantiation, and therefore typechecks. However, if we remove the signature, then GHC infers not the above type, but only the concrete one: w' = fromInteger w' GHCi> :t w w :: Integral