From: simonpj@microsoft.com Date: Wed, 25 Aug 2010 09:16:14 +0000 (+0000) Subject: Panic in the right way X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=9eba9078e1993db58b8e12e9287f448df64a4fb6 Panic in the right way --- diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs index 3ab10a4..93ad614 100644 --- a/compiler/main/HscMain.lhs +++ b/compiler/main/HscMain.lhs @@ -54,6 +54,7 @@ import DsMeta ( templateHaskellNames ) import SrcLoc ( SrcSpan, noSrcLoc, interactiveSrcLoc, srcLocSpan, noSrcSpan, unLoc ) import VarSet import VarEnv ( emptyTidyEnv ) +import Panic #endif import Id ( Id ) @@ -1027,7 +1028,7 @@ compileExpr :: HscEnv -> SrcSpan -> CoreExpr -> IO HValue compileExpr hsc_env srcspan ds_expr | rtsIsProfiled - = panic "You can't call compileExpr in a profiled compiler" + = throwIO (InstallationError "You can't call compileExpr in a profiled compiler") -- Otherwise you get a seg-fault when you run it | otherwise