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:
parent
45f8194c0c
commit
78c5cea161
@ -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] deferErrorsAndHoles $ do
|
ghandle handler $ runGmlT' [Left file] deferErrors $ do
|
||||||
opt <- options
|
opt <- options
|
||||||
crdl <- cradle
|
crdl <- cradle
|
||||||
style <- getStyle
|
style <- getStyle
|
||||||
|
@ -99,8 +99,5 @@ 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.setDeferTypedHoles $
|
||||||
|
Gap.setDeferTypeErrors $ setNoWarningFlags df
|
||||||
deferErrorsAndHoles :: DynFlags -> Ghc DynFlags
|
|
||||||
deferErrorsAndHoles df = return $
|
|
||||||
Gap.setDeferTypeErrors $ Gap.setDeferTypedHoles $ setNoWarningFlags df
|
|
||||||
|
@ -296,7 +296,7 @@ setDeferTypeErrors = id
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
setDeferTypedHoles :: DynFlags -> DynFlags
|
setDeferTypedHoles :: DynFlags -> DynFlags
|
||||||
#if __GLASGOW_HASKELL__ >= 708
|
#if __GLASGOW_HASKELL__ >= 710
|
||||||
setDeferTypedHoles dflag = gopt_set dflag Opt_DeferTypedHoles
|
setDeferTypedHoles dflag = gopt_set dflag Opt_DeferTypedHoles
|
||||||
#else
|
#else
|
||||||
setDeferTypedHoles = id
|
setDeferTypedHoles = id
|
||||||
|
Loading…
Reference in New Issue
Block a user