mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-11-06 03:06:14 +08:00
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)
This commit is contained in:
@@ -1391,7 +1391,7 @@ analyzeControlFlow params t =
|
|||||||
getFunctionTargets :: InternalState -> M.Map Node FunctionDefinition
|
getFunctionTargets :: InternalState -> M.Map Node FunctionDefinition
|
||||||
getFunctionTargets state =
|
getFunctionTargets state =
|
||||||
let
|
let
|
||||||
declaredFuncs = S.unions $ mapStorage $ sFunctionTargets state
|
declaredFuncs = S.unions $ M.elems $ mapStorage $ sFunctionTargets state
|
||||||
getFunc d =
|
getFunc d =
|
||||||
case d of
|
case d of
|
||||||
FunctionDefinition _ entry _ -> Just (entry, d)
|
FunctionDefinition _ entry _ -> Just (entry, d)
|
||||||
|
|||||||
Reference in New Issue
Block a user