From 1377a164d381adf7e311458f16963548733fcbff Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Sun, 6 Apr 2008 19:38:21 +0000 Subject: [PATCH] Improve error message for non-matching file name I changed the "File name does not match module name" error message so that it prints out both the declared module name and the expected module name (before, it was only printing the declared module name.) --- compiler/main/GHC.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index bd6eee6..00a9339 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -1898,8 +1898,9 @@ summariseModule hsc_env old_summary_map is_boot (L loc wanted_mod) maybe_buf exc when (mod_name /= wanted_mod) $ throwDyn $ mkPlainErrMsg mod_loc $ - text "file name does not match module name" - <+> quotes (ppr mod_name) + text "File name does not match module name:" + $$ text "Saw:" <+> quotes (ppr mod_name) + $$ text "Expected:" <+> quotes (ppr wanted_mod) -- Find the object timestamp, and return the summary obj_timestamp <- getObjTimestamp location is_boot -- 1.7.10.4