Set -fdefer-types-holes in case split

This commit is contained in:
Alejandro Serrano 2015-07-11 12:47:03 +02:00 committed by Anthony Cowley
parent f1191a419e
commit 45f8194c0c
3 changed files with 13 additions and 1 deletions

View File

@ -47,7 +47,7 @@ splits :: IOish m
-> Int -- ^ Column number.
-> GhcModT m String
splits file lineNo colNo =
ghandle handler $ runGmlT' [Left file] deferErrors $ do
ghandle handler $ runGmlT' [Left file] deferErrorsAndHoles $ do
opt <- options
crdl <- cradle
style <- getStyle

View File

@ -100,3 +100,7 @@ setNoMaxRelevantBindings = id
deferErrors :: DynFlags -> Ghc DynFlags
deferErrors df = return $
Gap.setWarnTypedHoles $ Gap.setDeferTypeErrors $ setNoWarningFlags df
deferErrorsAndHoles :: DynFlags -> Ghc DynFlags
deferErrorsAndHoles df = return $
Gap.setDeferTypeErrors $ Gap.setDeferTypedHoles $ setNoWarningFlags df

View File

@ -14,6 +14,7 @@ module Language.Haskell.GhcMod.Gap (
, setCabalPkg
, setHideAllPackages
, setDeferTypeErrors
, setDeferTypedHoles
, setWarnTypedHoles
, setDumpSplices
, isDumpSplices
@ -294,6 +295,13 @@ setDeferTypeErrors dflag = dopt_set dflag Opt_DeferTypeErrors
setDeferTypeErrors = id
#endif
setDeferTypedHoles :: DynFlags -> DynFlags
#if __GLASGOW_HASKELL__ >= 708
setDeferTypedHoles dflag = gopt_set dflag Opt_DeferTypedHoles
#else
setDeferTypedHoles = id
#endif
setWarnTypedHoles :: DynFlags -> DynFlags
#if __GLASGOW_HASKELL__ >= 708
setWarnTypedHoles dflag = wopt_set dflag Opt_WarnTypedHoles