From 95941de4798cc8542d6e3ea317ae3ed84470b83b Mon Sep 17 00:00:00 2001 From: simonpj Date: Wed, 28 Jul 2004 12:59:14 +0000 Subject: [PATCH] [project @ 2004-07-28 12:59:14 by simonpj] Fix GHCi buglet when browsing module --- ghc/compiler/iface/IfaceSyn.lhs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/iface/IfaceSyn.lhs b/ghc/compiler/iface/IfaceSyn.lhs index a529088..4b84227 100644 --- a/ghc/compiler/iface/IfaceSyn.lhs +++ b/ghc/compiler/iface/IfaceSyn.lhs @@ -489,8 +489,12 @@ tyThingToIfaceDecl _ abstract_tcs ext (ATyCon tycon) ifaceConDecls _ | abstract = IfAbstractTyCon ifaceConDecls (NewTyCon con _ _) = IfNewTyCon (ifaceConDecl con) ifaceConDecls (DataTyCon cons _) = IfDataTyCon (map ifaceConDecl cons) - ifaceConDecls AbstractTyCon = pprPanic "ifaceConDecls" (ppr tycon) - -- We're exporting this thing, so it's locally defined and should not be abstract + ifaceConDecls AbstractTyCon = IfAbstractTyCon + -- The last case should never happen when we are generating an + -- interface file (we're exporting this thing, so it's locally defined + -- and should not be abstract). But tyThingToIfaceDecl is also used + -- in TcRnDriver for GHCi, when browsing a module, in which case the + -- AbstractTyCon case is perfectly sensible. ifaceConDecl data_con = IfaceConDecl (getOccName (dataConName data_con)) -- 1.7.10.4