X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FRdrHsSyn.lhs;h=21fbb5acf1f0a51e5f6ff6b75b34f630d7204e1e;hp=052b9a689c0908f23dc7d15f407f0cc74643a47d;hb=ada48bbc7f6a43b2c042df629327902d82cea681;hpb=2a26efb65343e31957b043f63c43caf24d5eeb30 diff --git a/compiler/parser/RdrHsSyn.lhs b/compiler/parser/RdrHsSyn.lhs index 052b9a6..21fbb5a 100644 --- a/compiler/parser/RdrHsSyn.lhs +++ b/compiler/parser/RdrHsSyn.lhs @@ -814,18 +814,18 @@ checkValSig lhs@(L l _) ty where hint = if foreign_RDR `looks_like` lhs then "Perhaps you meant to use -XForeignFunctionInterface?" - else if generic_RDR `looks_like` lhs - then "Perhaps you meant to use -XGenerics?" + else if default_RDR `looks_like` lhs + then "Perhaps you meant to use -XDefaultSignatures?" else "Should be of form :: " -- A common error is to forget the ForeignFunctionInterface flag -- so check for that, and suggest. cf Trac #3805 -- Sadly 'foreign import' still barfs 'parse error' because 'import' is a keyword looks_like s (L _ (HsVar v)) = v == s looks_like s (L _ (HsApp lhs _)) = looks_like s lhs - looks_like s _ = False + looks_like _ _ = False foreign_RDR = mkUnqual varName (fsLit "foreign") - generic_RDR = mkUnqual varName (fsLit "generic") + default_RDR = mkUnqual varName (fsLit "default") checkDoAndIfThenElse :: LHsExpr RdrName -> Bool