DeferErrors implies DeferTypedHoles in GHC >= 7.10

The Opt_DeferErrors flag should imply Opt_DeferTypedHoles. The proper
API for setting these flags that implements such implications is
unfortunately not exposed by GHC.
This commit is contained in:
Anthony Cowley 2015-08-14 12:18:26 -04:00
parent 45f8194c0c
commit 78c5cea161
3 changed files with 4 additions and 7 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] deferErrorsAndHoles $ do
ghandle handler $ runGmlT' [Left file] deferErrors $ do
opt <- options
crdl <- cradle
style <- getStyle

View File

@ -99,8 +99,5 @@ 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
Gap.setWarnTypedHoles $ Gap.setDeferTypedHoles $
Gap.setDeferTypeErrors $ setNoWarningFlags df

View File

@ -296,7 +296,7 @@ setDeferTypeErrors = id
#endif
setDeferTypedHoles :: DynFlags -> DynFlags
#if __GLASGOW_HASKELL__ >= 708
#if __GLASGOW_HASKELL__ >= 710
setDeferTypedHoles dflag = gopt_set dflag Opt_DeferTypedHoles
#else
setDeferTypedHoles = id