From: simonpj Date: Mon, 28 Feb 2005 16:01:52 +0000 (+0000) Subject: [project @ 2005-02-28 16:01:52 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1012 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=05c7c6e4ce3f011ede56cc3c55abfc5794429a3d;p=ghc-hetmet.git [project @ 2005-02-28 16:01:52 by simonpj] Print empty classes right --- diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index a686e43..6fe4755 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,6 +1,6 @@ {-# OPTIONS -#include "Linker.h" #-} ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.191 2005/02/25 13:07:10 simonpj Exp $ +-- $Id: InteractiveUI.hs,v 1.192 2005/02/28 16:01:52 simonpj Exp $ -- -- GHC Interactive User Interface -- @@ -598,9 +598,11 @@ showDecl exts want_name (IfaceData {ifName = tycon, showDecl exts want_name (IfaceClass {ifCtxt = context, ifName = clas, ifTyVars = tyvars, ifFDs = fds, ifSigs = sigs}) = hang (ptext SLIT("class") <+> pprIfaceDeclHead context clas tyvars - <+> pprFundeps fds <+> ptext SLIT("where")) + <+> pprFundeps fds <+> opt_where) 2 (vcat (ppr_trim show_op sigs)) where + opt_where | null sigs = empty + | otherwise = ptext SLIT("where") show_op (IfaceClassOp op dm ty) | want_name clas || want_name op = Just (ppr_bndr op <+> dcolon <+> showType exts ty)