Commit 97fda59c by Zachary Snow

convert needless patterns to concats

parent 1f7c70df
...@@ -445,7 +445,9 @@ convertAsgn structs types (lhs, expr) = ...@@ -445,7 +445,9 @@ convertAsgn structs types (lhs, expr) =
(Implicit Unspecified [], Bits (Right e')) (Implicit Unspecified [], Bits (Right e'))
where e' = snd $ convertSubExpr e where e' = snd $ convertSubExpr e
convertSubExpr (Pattern items) = convertSubExpr (Pattern items) =
(Implicit Unspecified [], Pattern items') if all (== Nothing) $ map fst items'
then (Implicit Unspecified [], Concat $ map snd items')
else (Implicit Unspecified [], Pattern items')
where where
items' = map mapItem items items' = map mapItem items
mapItem (mx, e) = (mx, snd $ convertSubExpr e) mapItem (mx, e) = (mx, snd $ convertSubExpr e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment