From 14ee462ccd572c14ca292b47330e87c9307e0a7c Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sun, 5 Apr 2020 15:27:11 -0400 Subject: [PATCH] Use execState instead of reimplementing it --- src/ShellCheck/AnalyzerLib.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ShellCheck/AnalyzerLib.hs b/src/ShellCheck/AnalyzerLib.hs index 4348438..8f168dc 100644 --- a/src/ShellCheck/AnalyzerLib.hs +++ b/src/ShellCheck/AnalyzerLib.hs @@ -409,8 +409,7 @@ tokenIsJustCommandOutput t = case t of -- TODO: Replace this with a proper Control Flow Graph getVariableFlow params t = - let (_, stack) = runState (doStackAnalysis startScope endScope t) [] - in reverse stack + reverse $ execState (doStackAnalysis startScope endScope t) [] where startScope t = let scopeType = leadType params t