From 9eba9078e1993db58b8e12e9287f448df64a4fb6 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 25 Aug 2010 09:16:14 +0000 Subject: [PATCH] Panic in the right way --- compiler/main/HscMain.lhs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 1.7.10.4