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