From f25b8bd03af4997df3572973a09da025f417422c Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sat, 1 Feb 2020 22:50:20 -0500 Subject: [PATCH] Use gets instead of fmapping the result of get --- src/ShellCheck/Analytics.hs | 2 +- src/ShellCheck/Parser.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs index 8d10a02..ae8e81d 100644 --- a/src/ShellCheck/Analytics.hs +++ b/src/ShellCheck/Analytics.hs @@ -1961,7 +1961,7 @@ prop_checkQuotesInLiterals9 = verifyNotTree checkQuotesInLiterals "param=\"/foo/ checkQuotesInLiterals params t = doVariableFlowAnalysis readF writeF Map.empty (variableFlow params) where - getQuotes name = fmap (Map.lookup name) get + getQuotes name = gets (Map.lookup name) setQuotes name ref = modify $ Map.insert name ref deleteQuotes = modify . Map.delete parents = parentMap params diff --git a/src/ShellCheck/Parser.hs b/src/ShellCheck/Parser.hs index f295560..fa9084e 100644 --- a/src/ShellCheck/Parser.hs +++ b/src/ShellCheck/Parser.hs @@ -325,7 +325,7 @@ parseProblem level code msg = do parseProblemAt pos level code msg setCurrentContexts c = Ms.modify (\state -> state { contextStack = c }) -getCurrentContexts = contextStack <$> Ms.get +getCurrentContexts = Ms.gets contextStack popContext = do v <- getCurrentContexts