Set -fdefer-types-holes in case split
This commit is contained in:
parent
f1191a419e
commit
45f8194c0c
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user