Use gets instead of fmapping the result of get
This commit is contained in:
parent
d7278b95f2
commit
f25b8bd03a
|
@ -1961,7 +1961,7 @@ prop_checkQuotesInLiterals9 = verifyNotTree checkQuotesInLiterals "param=\"/foo/
|
||||||
checkQuotesInLiterals params t =
|
checkQuotesInLiterals params t =
|
||||||
doVariableFlowAnalysis readF writeF Map.empty (variableFlow params)
|
doVariableFlowAnalysis readF writeF Map.empty (variableFlow params)
|
||||||
where
|
where
|
||||||
getQuotes name = fmap (Map.lookup name) get
|
getQuotes name = gets (Map.lookup name)
|
||||||
setQuotes name ref = modify $ Map.insert name ref
|
setQuotes name ref = modify $ Map.insert name ref
|
||||||
deleteQuotes = modify . Map.delete
|
deleteQuotes = modify . Map.delete
|
||||||
parents = parentMap params
|
parents = parentMap params
|
||||||
|
|
|
@ -325,7 +325,7 @@ parseProblem level code msg = do
|
||||||
parseProblemAt pos level code msg
|
parseProblemAt pos level code msg
|
||||||
|
|
||||||
setCurrentContexts c = Ms.modify (\state -> state { contextStack = c })
|
setCurrentContexts c = Ms.modify (\state -> state { contextStack = c })
|
||||||
getCurrentContexts = contextStack <$> Ms.get
|
getCurrentContexts = Ms.gets contextStack
|
||||||
|
|
||||||
popContext = do
|
popContext = do
|
||||||
v <- getCurrentContexts
|
v <- getCurrentContexts
|
||||||
|
|
Loading…
Reference in New Issue