fixing typos.
This commit is contained in:
parent
a483f4f8b6
commit
9456ea426d
@ -31,7 +31,7 @@ check :: IOish m
|
||||
=> [FilePath] -- ^ The target files.
|
||||
-> GhcModT m (Either String String)
|
||||
check fileNames = overrideGhcUserOptions $ \ghcOpts -> do
|
||||
withLogger (setAllWaringFlags . setNoMaxRelevantBindings . Gap.setWarnTypedHoles . Gap.setDeferTypeErrors) $ do
|
||||
withLogger (setAllWarningFlags . setNoMaxRelevantBindings . Gap.setWarnTypedHoles . Gap.setDeferTypeErrors) $ do
|
||||
_ <- G.setSessionDynFlags =<< addCmdOpts ghcOpts =<< G.getSessionDynFlags
|
||||
setTargetFiles fileNames
|
||||
|
||||
@ -50,5 +50,5 @@ expandTemplate files = either id id <$> expand files
|
||||
expand :: IOish m
|
||||
=> [FilePath] -- ^ The target files.
|
||||
-> GhcModT m (Either String String)
|
||||
expand fileNames = withLogger (Gap.setDumpSplices . setNoWaringFlags) $
|
||||
expand fileNames = withLogger (Gap.setDumpSplices . setNoWarningFlags) $
|
||||
setTargetFiles fileNames
|
||||
|
@ -96,12 +96,12 @@ withCmdFlags flags body = G.gbracket setup teardown (\_ -> body)
|
||||
----------------------------------------------------------------
|
||||
|
||||
-- | Set 'DynFlags' equivalent to "-w:".
|
||||
setNoWaringFlags :: DynFlags -> DynFlags
|
||||
setNoWaringFlags df = df { warningFlags = Gap.emptyWarnFlags}
|
||||
setNoWarningFlags :: DynFlags -> DynFlags
|
||||
setNoWarningFlags df = df { warningFlags = Gap.emptyWarnFlags}
|
||||
|
||||
-- | Set 'DynFlags' equivalent to "-Wall".
|
||||
setAllWaringFlags :: DynFlags -> DynFlags
|
||||
setAllWaringFlags df = df { warningFlags = allWarningFlags }
|
||||
setAllWarningFlags :: DynFlags -> DynFlags
|
||||
setAllWarningFlags df = df { warningFlags = allWarningFlags }
|
||||
|
||||
allWarningFlags :: Gap.WarnFlags
|
||||
allWarningFlags = unsafePerformIO $
|
||||
|
@ -24,8 +24,8 @@ module Language.Haskell.GhcMod.Internal (
|
||||
, setTargetFiles
|
||||
-- * Logging
|
||||
, withLogger
|
||||
, setNoWaringFlags
|
||||
, setAllWaringFlags
|
||||
, setNoWarningFlags
|
||||
, setAllWarningFlags
|
||||
-- * Environment, state and logging
|
||||
, GhcModEnv(..)
|
||||
, newGhcModEnv
|
||||
|
@ -87,7 +87,7 @@ pretty dflag style = showOneLine dflag style . Gap.typeForUser
|
||||
|
||||
inModuleContext :: IOish m => FilePath -> (DynFlags -> PprStyle -> GhcModT m a) -> GhcModT m a
|
||||
inModuleContext file action =
|
||||
withDynFlags (setWarnTypedHoles . setDeferTypeErrors . setNoWaringFlags) $ do
|
||||
withDynFlags (setWarnTypedHoles . setDeferTypeErrors . setNoWarningFlags) $ do
|
||||
setTargetFiles [file]
|
||||
Gap.withContext $ do
|
||||
dflag <- G.getSessionDynFlags
|
||||
|
Loading…
Reference in New Issue
Block a user