diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2021-10-21 17:39:41 +0530 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2021-10-21 17:58:34 +0530 |
commit | 95b25a0fa66cb7eda4bc54ba3cce3d9fc73c8262 (patch) | |
tree | c3b26ba54590cd6f4c666fa2f0592b39faa2b3bb /compiler/GHC/Driver/Main.hs | |
parent | 1c4078db07df370e5ba48268c980e3ff5145e111 (diff) | |
download | haskell-wip/backpack-errs.tar.gz |
Rename `ms_hspp_file` to `ms_hspp_file_loc` and change itswip/backpack-errs
type to a `RealSrcLoc` to accomodate backpack
Diffstat (limited to 'compiler/GHC/Driver/Main.hs')
-rw-r--r-- | compiler/GHC/Driver/Main.hs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index 15ddec68e2..8020630ae9 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -399,9 +399,7 @@ hscParse' mod_summary {-# SCC "Parser" #-} withTiming logger (text "Parser"<+>brackets (ppr $ ms_mod mod_summary)) (const ()) $ do - let src_filename = case ms_hspp_file mod_summary of - PreprocessedFile f -> f - BackpackFile _ -> pprPanic "hscParse" (text "Can't parse backpack interface file:" <+> ppr mod_summary) + let src_filename = unpackFS $ srcLocFile $ ms_hspp_file_loc mod_summary maybe_src_buf = ms_hspp_buf mod_summary -------------------------- Parser ---------------- @@ -544,9 +542,7 @@ hsc_typecheck keep_rn mod_summary mb_rdr_module = do mod_name = moduleName outer_mod outer_mod' = mkHomeModule home_unit mod_name inner_mod = homeModuleNameInstantiation home_unit mod_name - real_loc = realSrcLocSpan $ case ms_hspp_file mod_summary of - PreprocessedFile src_filename -> mkRealSrcLoc (mkFastString src_filename) 1 1 - BackpackFile loc -> loc + real_loc = realSrcLocSpan $ ms_hspp_file_loc mod_summary keep_rn' = gopt Opt_WriteHie dflags || keep_rn massert (isHomeModule home_unit outer_mod) tc_result <- if hsc_src == HsigFile && not (isHoleModule inner_mod) |