File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -137,13 +137,12 @@ groupEquivStates DFA { dfa_states = statemap }
137
137
| otherwise = [nonaccepting_states]
138
138
init_q = accept_groups
139
139
140
- -- elements of
141
- -- a map from token T to
142
- -- a map from state S to the set of states that transition to
143
- -- S on token T
140
+ -- a map from token T to
141
+ -- a map from state S to the set of states that transition to
142
+ -- S on token T
144
143
-- This is a cache of the information needed to compute xs below
145
- bigmap :: [ IntMap EquivalenceClass ]
146
- bigmap = IM. elems $ IM. fromListWith (IM. unionWith IS. union)
144
+ bigmap :: IntMap ( IntMap EquivalenceClass )
145
+ bigmap = IM. fromListWith (IM. unionWith IS. union)
147
146
[ (i, IM. singleton to (IS. singleton from))
148
147
| (from, state) <- Map. toList statemap,
149
148
(i,to) <- IM. toList (state_out state) ]
@@ -156,7 +155,7 @@ groupEquivStates DFA { dfa_states = statemap }
156
155
xs :: [EquivalenceClass ]
157
156
xs = filter (not . IS. null )
158
157
. map (\ m -> IS. unions [IM. findWithDefault IS. empty s m | s <- IS. toList a])
159
- $ bigmap
158
+ $ IM. elems bigmap
160
159
161
160
go0 (r,q) x = go1 r [] []
162
161
where
You can’t perform that action at this time.
0 commit comments