~safinaskar/check-cfg-ambiguity

62e1de792f383f7b343986f3595bd7e0726bd698 — Askar Safin 1 year, 5 months ago 000d5a5
Trivial change
1 files changed, 3 insertions(+), 2 deletions(-)

M CheckCFGAmbiguity.hs
M CheckCFGAmbiguity.hs => CheckCFGAmbiguity.hs +3 -2
@@ 133,8 133,9 @@ lowLevelTestAmbiguity (Grammar g) start count = case Data.Map.member start g of 
        };
        currWordsV2 <- readSTRef currWords;
        allWordsV <- readSTRef allWords;
        writeSTRef allWords (Data.Set.union allWordsV (Data.Set.fromList currWordsV2));
        when (Data.Set.size (Data.Set.union allWordsV (Data.Set.fromList currWordsV2)) /= (Data.Set.size allWordsV + length currWordsV2)) $ writeSTRef collision True;
        let { allWordsV2 = Data.Set.union allWordsV (Data.Set.fromList currWordsV2); };
        writeSTRef allWords allWordsV2;
        when (Data.Set.size allWordsV2 /= (Data.Set.size allWordsV + length currWordsV2)) $ writeSTRef collision True;
      };
      iV <- readSTRef i;
      writeSTRef i (iV + 1);