refactoring.
This commit is contained in:
parent
d6762ede6e
commit
d6a81c0506
@ -139,17 +139,20 @@ pretty dflag style = showOneLine dflag style . Gap.typeForUser
|
|||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
noWaringOptions :: [String]
|
||||||
|
noWaringOptions = ["-w:"]
|
||||||
|
|
||||||
inModuleContext :: Cmd -> Options -> Cradle -> FilePath -> ModuleString -> Ghc String -> String -> Ghc String
|
inModuleContext :: Cmd -> Options -> Cradle -> FilePath -> ModuleString -> Ghc String -> String -> Ghc String
|
||||||
inModuleContext _ opt cradle file modstr action errmsg =
|
inModuleContext _ opt cradle file modstr action errmsg =
|
||||||
valid ||> invalid ||> return errmsg
|
valid ||> invalid ||> return errmsg
|
||||||
where
|
where
|
||||||
valid = do
|
valid = do
|
||||||
void $ initializeFlagsWithCradle opt cradle ["-w:"] False
|
void $ initializeFlagsWithCradle opt cradle noWaringOptions False
|
||||||
setTargetFiles [file]
|
setTargetFiles [file]
|
||||||
void $ G.load LoadAllTargets
|
void $ G.load LoadAllTargets
|
||||||
doif setContextFromTarget action
|
doif setContextFromTarget action
|
||||||
invalid = do
|
invalid = do
|
||||||
void $ initializeFlagsWithCradle opt cradle ["-w:"] False
|
void $ initializeFlagsWithCradle opt cradle noWaringOptions False
|
||||||
setTargetBuffer
|
setTargetBuffer
|
||||||
void $ G.load LoadAllTargets
|
void $ G.load LoadAllTargets
|
||||||
doif setContextFromTarget action
|
doif setContextFromTarget action
|
||||||
|
Loading…
Reference in New Issue
Block a user