diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-12-21 20:25:08 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-12-21 22:43:48 +0100 |
commit | ff3f918d1c9685857d3ba4bb0dc119616e89cbe6 (patch) | |
tree | 81c3d05d42363fcf51a65ff1bd04a0260a71bb35 /compiler/main/GhcMake.hs | |
parent | 55250a63cc3f285fb479f1ef396e88dc0c58b218 (diff) | |
download | haskell-ff3f918d1c9685857d3ba4bb0dc119616e89cbe6.tar.gz |
Fix #11256 by not immediately erroring if we can't find a module.
Test Plan: validate
Reviewers: austin, bgamari, thomie
Reviewed By: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D1669
GHC Trac Issues: #11256
Diffstat (limited to 'compiler/main/GhcMake.hs')
-rw-r--r-- | compiler/main/GhcMake.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs index 41d4f1c592..843def1192 100644 --- a/compiler/main/GhcMake.hs +++ b/compiler/main/GhcMake.hs @@ -1886,13 +1886,11 @@ summariseModule hsc_env old_summary_map is_boot (L loc wanted_mod) | isJust (ml_hs_file location) -> -- Home package just_found location mod - | otherwise -> - -- Drop external-pkg - ASSERT(moduleUnitId mod /= thisPackage dflags) - return Nothing - err -> return $ Just $ Left $ noModError dflags loc wanted_mod err + _ -> return Nothing -- Not found + -- (If it is TRULY not found at all, we'll + -- error when we actually try to compile) just_found location mod = do -- Adjust location to point to the hs-boot source file, |