From 73707ed58d879cc04cb644c5dab88c39ca1465b7 Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Sat, 23 Jun 2018 16:45:31 +0200 Subject: outOfScope: Recommend qualifying the identifier --- haddock-api/src/Haddock/Interface/LexParseRn.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'haddock-api/src/Haddock') diff --git a/haddock-api/src/Haddock/Interface/LexParseRn.hs b/haddock-api/src/Haddock/Interface/LexParseRn.hs index e83708d0..87face7c 100644 --- a/haddock-api/src/Haddock/Interface/LexParseRn.hs +++ b/haddock-api/src/Haddock/Interface/LexParseRn.hs @@ -164,7 +164,9 @@ outOfScope dflags x = Exact name -> warnAndMonospace name -- Shouldn't happen since x is out of scope where warnAndMonospace a = do - tell ["Warning: '" ++ showPpr dflags a ++ "' is out of scope."] + tell ["Warning: '" ++ showPpr dflags a ++ "' is out of scope.\n" ++ + " If you qualify the identifier, haddock can try to link it\n" ++ + " it anyway."] pure (monospaced a) monospaced a = DocMonospaced (DocString (showPpr dflags a)) -- cgit v1.2.3