Thanks to DeferTypeErrors, info/type can work even if the file contains errors.

This commit is contained in:
Kazu Yamamoto
2014-04-26 11:43:30 +09:00
parent 66a5123f8c
commit c8fbdcfa2f
3 changed files with 37 additions and 17 deletions

View File

@@ -30,6 +30,7 @@ module Language.Haskell.GhcMod.Gap (
, GapThing(..)
, fromTyThing
, dumpSplicesFlag
, setDeferTypeErrors
) where
import Control.Applicative hiding (empty)
@@ -363,3 +364,12 @@ dumpSplicesFlag :: DumpFlag
dumpSplicesFlag :: DynFlag
#endif
dumpSplicesFlag = Opt_D_dump_splices
setDeferTypeErrors :: DynFlags -> DynFlags
#if __GLASGOW_HASKELL__ >= 707
setDeferTypeErrors dflag = gopt_set dflag Opt_DeferTypeErrors
#elif __GLASGOW_HASKELL__ >= 706
setDeferTypeErrors dflag = dopt_set dflag Opt_DeferTypeErrors
#else
setDeferTypeErrors = id
#endif