~safinaskar/check-cfg-ambiguity

55e6f5e05679c88da0d7b3bd577b455ae7b019fc — Askar Safin 1 year, 4 months ago c60754d
Optimization
1 files changed, 2 insertions(+), 2 deletions(-)

M CheckCFGAmbiguity.hs
M CheckCFGAmbiguity.hs => CheckCFGAmbiguity.hs +2 -2
@@ 124,9 124,9 @@ lowLevelTestAmbiguity (Grammar g) start count = case Data.Map.member start g of 
          let { (before, after) = break (\case { N _ -> True; T _ -> False; }) word };
          case after of {
            [] -> return ();
            (N nn):rest -> for_ (fromJust $ Data.Map.lookup nn g) $ \prod -> do {
            (N nn):rest -> do {
              currWordsV2 <- readSTRef currWords;
              writeSTRef currWords $ (before ++ prod ++ rest):currWordsV2;
              writeSTRef currWords $ ((fromJust $ Data.Map.lookup nn g) <&> \prod -> before ++ prod ++ rest) ++ currWordsV2;
            };
            _ -> error "Impossible";
          };