-checkValSig lhs@(L l _) _
- | looks_like_foreign lhs
- = parseError l "Invalid type signature; perhaps you meant to use -XForeignFunctionInterface?"
- | otherwise
- = parseError l "Invalid type signature: should be of form <variable> :: <type>"
+checkValSig lhs@(L l _) ty
+ = parseErrorSDoc l ((text "Invalid type signature:" <+>
+ ppr lhs <+> text "::" <+> ppr ty)
+ $$ text hint)