Use a list comprehension instead of a concatMap with extra lists

This commit is contained in:
Joseph C. Sible 2020-04-05 15:35:09 -04:00
parent f55d8c45e5
commit f833ee3d5a
1 changed files with 1 additions and 5 deletions

View File

@ -467,11 +467,7 @@ leadType params t =
getModifiedVariables t = getModifiedVariables t =
case t of case t of
T_SimpleCommand _ vars [] -> T_SimpleCommand _ vars [] ->
concatMap (\x -> case x of [(x, x, name, dataTypeFrom DataString w) | x@(T_Assignment id _ name _ w) <- vars]
T_Assignment id _ name _ w ->
[(x, x, name, dataTypeFrom DataString w)]
_ -> []
) vars
c@T_SimpleCommand {} -> c@T_SimpleCommand {} ->
getModifiedVariableCommand c getModifiedVariableCommand c