提交 74b1745a 编写于 作者: V Vidar Holen

Fix compiler error on some GHC versions

Fixes the following error:

    src/ShellCheck/CFGAnalysis.hs:1394:40: error:
	* Couldn't match expected type `[S.Set a]'
		      with actual type `M.Map String FunctionValue'
	* In the second argument of `($)', namely
	    `mapStorage $ sFunctionTargets state'
	  In the expression: S.unions $ mapStorage $ sFunctionTargets state
	  In an equation for `declaredFuncs':
	      declaredFuncs = S.unions $ mapStorage $ sFunctionTargets state
	* Relevant bindings include
	    declaredFuncs :: S.Set a
	      (bound at src/ShellCheck/CFGAnalysis.hs:1394:13)
上级 495e34d1
......@@ -1391,7 +1391,7 @@ analyzeControlFlow params t =
getFunctionTargets :: InternalState -> M.Map Node FunctionDefinition
getFunctionTargets state =
let
declaredFuncs = S.unions $ mapStorage $ sFunctionTargets state
declaredFuncs = S.unions $ M.elems $ mapStorage $ sFunctionTargets state
getFunc d =
case d of
FunctionDefinition _ entry _ -> Just (entry, d)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册