fix premature elaboration of single element patterns

This commit is contained in:
Zachary Snow
2020-12-07 16:23:29 -07:00
parent ad18c583ab
commit d137fd3d68
3 changed files with 21 additions and 0 deletions
+1
View File
@@ -36,6 +36,7 @@ simplifyStep (UniOp LogNot (BinOp Ne a b)) = BinOp Eq a b
simplifyStep (UniOp UniSub (UniOp UniSub e)) = e
simplifyStep (UniOp UniSub (BinOp Sub e1 e2)) = BinOp Sub e2 e1
simplifyStep (e @ (Concat [Pattern{}])) = e
simplifyStep (Concat [e]) = e
simplifyStep (Concat es) = Concat $ filter (/= Concat []) es
simplifyStep (Repeat (Dec 0) _) = Concat []