File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1067,8 +1067,10 @@ processMStatesAll depth streams = do
1067
1067
else mappend matches $ processMStatesAll (depth + 1 ) streams'
1068
1068
where
1069
1069
convert :: Map Int [a ] -> [[a ]]
1070
- convert = M. foldlWithKey (\ l k x -> if length l <= k then l ++ (replicate (k - length l) [] ) ++ [x]
1071
- else let (xs, y: ys) = splitAt k l in xs ++ (x: ys)) []
1070
+ convert ms = let ((start, root), ms') = M. deleteFindMin ms in
1071
+ M. foldlWithKey (\ l k x -> let k' = k - start in
1072
+ if length l <= k' then l ++ (replicate (k' - length l) [] ) ++ [x]
1073
+ else let (xs, y: ys) = splitAt k' l in xs ++ (x: ys)) [root] ms'
1072
1074
1073
1075
processMStatesLine :: Int -> MatchingStates -> EgisonM MatchingStates
1074
1076
processMStatesLine depth streams = do
Original file line number Diff line number Diff line change @@ -654,7 +654,7 @@ loopPat :: Parser EgisonPattern
654
654
loopPat = keywordLoop >> parens (char ' $' >> LoopPat <$> identVarWithoutIndex <*> (comma >> loopRange) <*> (comma >> pattern ) <*> (comma >> option (NotPat WildCard ) pattern ))
655
655
656
656
loopRange :: Parser LoopRange
657
- loopRange = parens (try (LoopRange <$> expr <* comma <*> expr <* comma <* > option WildCard pattern )
657
+ loopRange = parens (try (LoopRange <$> expr <* comma <*> expr <*> option WildCard (comma >> pattern ) )
658
658
<|> (do s <- expr
659
659
comma
660
660
ep <- option WildCard pattern
You can’t perform that action at this time.
0 commit comments