Commit 1a74e146 authored by Simon Marlow's avatar Simon Marlow
Browse files

fix panic in #1379

parent 90046375
......@@ -1471,6 +1471,10 @@ wantNameFromInterpretedModule noCanDo str and_then = do
[] -> return ()
(n:_) -> do
let modl = GHC.nameModule n
if not (GHC.isExternalName n)
then noCanDo n $ ppr n <>
text " is not defined in an interpreted module"
else do
is_interpreted <- io (GHC.moduleIsInterpreted session modl)
if not is_interpreted
then noCanDo n $ text "module " <> ppr modl <>
......
......@@ -110,7 +110,7 @@ module GHC (
-- ** Names
Name,
nameModule, pprParenSymName, nameSrcSpan,
isExternalName, nameModule, pprParenSymName, nameSrcSpan,
NamedThing(..),
RdrName(Qual,Unqual),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment