X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FHscMain.lhs;h=93ad614a58a53f009f607068996c0f4a100506e7;hb=a66541af84d102f32b73fb7f89f48008c01092a6;hp=933503e4915742d14184463212503051a61a4b62;hpb=b017f34bebf1588e5e579d7c653413e2a4c2d170;p=ghc-hetmet.git diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs index 933503e..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 ) @@ -1026,6 +1027,11 @@ hscParseThing parser dflags str compileExpr :: HscEnv -> SrcSpan -> CoreExpr -> IO HValue compileExpr hsc_env srcspan ds_expr + | rtsIsProfiled + = throwIO (InstallationError "You can't call compileExpr in a profiled compiler") + -- Otherwise you get a seg-fault when you run it + + | otherwise = do { let { dflags = hsc_dflags hsc_env ; lint_on = dopt Opt_DoCoreLinting dflags }