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.
|
-> Int -- ^ Column number.
|
||||||
-> GhcModT m String
|
-> GhcModT m String
|
||||||
splits file lineNo colNo =
|
splits file lineNo colNo =
|
||||||
ghandle handler $ runGmlT' [Left file] deferErrors $ do
|
ghandle handler $ runGmlT' [Left file] deferErrorsAndHoles $ do
|
||||||
opt <- options
|
opt <- options
|
||||||
crdl <- cradle
|
crdl <- cradle
|
||||||
style <- getStyle
|
style <- getStyle
|
||||||
|
@ -100,3 +100,7 @@ setNoMaxRelevantBindings = id
|
|||||||
deferErrors :: DynFlags -> Ghc DynFlags
|
deferErrors :: DynFlags -> Ghc DynFlags
|
||||||
deferErrors df = return $
|
deferErrors df = return $
|
||||||
Gap.setWarnTypedHoles $ Gap.setDeferTypeErrors $ setNoWarningFlags df
|
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
|
, setCabalPkg
|
||||||
, setHideAllPackages
|
, setHideAllPackages
|
||||||
, setDeferTypeErrors
|
, setDeferTypeErrors
|
||||||
|
, setDeferTypedHoles
|
||||||
, setWarnTypedHoles
|
, setWarnTypedHoles
|
||||||
, setDumpSplices
|
, setDumpSplices
|
||||||
, isDumpSplices
|
, isDumpSplices
|
||||||
@ -294,6 +295,13 @@ setDeferTypeErrors dflag = dopt_set dflag Opt_DeferTypeErrors
|
|||||||
setDeferTypeErrors = id
|
setDeferTypeErrors = id
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
setDeferTypedHoles :: DynFlags -> DynFlags
|
||||||
|
#if __GLASGOW_HASKELL__ >= 708
|
||||||
|
setDeferTypedHoles dflag = gopt_set dflag Opt_DeferTypedHoles
|
||||||
|
#else
|
||||||
|
setDeferTypedHoles = id
|
||||||
|
#endif
|
||||||
|
|
||||||
setWarnTypedHoles :: DynFlags -> DynFlags
|
setWarnTypedHoles :: DynFlags -> DynFlags
|
||||||
#if __GLASGOW_HASKELL__ >= 708
|
#if __GLASGOW_HASKELL__ >= 708
|
||||||
setWarnTypedHoles dflag = wopt_set dflag Opt_WarnTypedHoles
|
setWarnTypedHoles dflag = wopt_set dflag Opt_WarnTypedHoles
|
||||||
|
Loading…
Reference in New Issue
Block a user