Ian Lynagh wrote: > I've reverted this: the Doc is passed in the PanicDoc constructor, so it > shouldn't be necessary. > > What problem were you trying to solve?
Well, pprPanic is defined as: pprPanic :: String -> SDoc -> a -- ^ Throw an exception saying "bug in GHC" pprPanic = panicDoc and panicDoc is defined as: panicDoc :: String -> SDoc -> a panicDoc x doc = throwGhcException (PprPanic x doc) when the exception is throw it ends up in showGhcException which drops the SDoc part of the message on the floor: PprPanic s _ -> showGhcException (Panic (s ++ "\n<<details unavailable>>")) I tried to convert the SDoc to a String in this code, but that resulted in a circular import. The obvious solution was the one in my patch. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/ _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc