We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e47771 commit 833ff8cCopy full SHA for 833ff8c
src/DFAMin.hs
@@ -2,6 +2,7 @@
2
3
{-# LANGUAGE PatternGuards #-}
4
{-# LANGUAGE ScopedTypeVariables #-}
5
+{-# LANGUAGE TupleSections #-}
6
7
module DFAMin (minimizeDFA) where
8
@@ -54,7 +55,7 @@ minimizeDFA dfa@DFA { dfa_start_states = starts,
54
55
number n (ss:sss) =
56
case filter (`IS.member` ss) starts of
57
[] -> (n,ss) : number (n+1) sss
- starts' -> zip starts' (repeat ss) ++ number n sss
58
+ starts' -> map (,ss) starts' ++ number n sss
59
-- if one of the states of the minimized DFA corresponds
60
-- to multiple starts states, we just have to duplicate
61
-- that state.
0 commit comments