From e2aae59499ad4fadac37a2ce3ba47f7c3100e036 Mon Sep 17 00:00:00 2001 From: hi Date: Sun, 10 Aug 2025 15:29:57 +0000 Subject: [PATCH] fix: language M rule 4 not removing late UUs --- Logic/Language/M.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Logic/Language/M.hs b/Logic/Language/M.hs index b605e05..1722de4 100644 --- a/Logic/Language/M.hs +++ b/Logic/Language/M.hs @@ -40,7 +40,7 @@ mRule2 _ = [] mRule3 :: StringM -> [StringM] mRule3 string@(M:xs) = (M:) <$> aux xs where - aux (I:xs@(I:I:xs')) = (U:xs'):((I:) <$> aux xs) + aux (x@I:xs@(I:I:xs')) = (U:xs'):((x:) <$> aux xs) aux (x:xs) = (x:) <$> aux xs aux _ = [] mRule3 _ = [] @@ -49,7 +49,7 @@ mRule3 _ = [] mRule4 :: StringM -> [StringM] mRule4 string@(M:xs) = (M:) <$> aux xs where - aux (U:U:xs) = [xs] + aux (x@U:xs@(U:xs')) = xs':((x:) <$> aux xs) aux (x:xs) = (x:) <$> aux xs aux _ = [] mRule4 _ = []