File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -157,9 +157,21 @@ groupEquivStates DFA { dfa_states = statemap }
157
157
go r (a: q) = uncurry go $ List. foldl' go0 (a: r,q) xs
158
158
where
159
159
xs :: [EquivalenceClass ]
160
- xs = filter (not . IS. null )
161
- . map (\ m -> IS. unions [IM. findWithDefault IS. empty s m | s <- IS. toList a])
162
- $ IM. elems bigmap
160
+ #if MIN_VERSION_containers(0, 6, 0)
161
+ xs =
162
+ [ x
163
+ | preimageMap <- IM. elems bigmap
164
+ , let x = IS. unions (IM. restrictKeys preimageMap a)
165
+ , not (IS. null x)
166
+ ]
167
+ #else
168
+ xs =
169
+ [ x
170
+ | preimageMap <- IM. elems bigmap
171
+ , let x = IS. unions [IM. findWithDefault IS. empty s preimageMap | s <- IS. toList a]
172
+ , not (IS. null x)
173
+ ]
174
+ #endif
163
175
164
176
go0 (r,q) x = go1 r [] []
165
177
where
You can’t perform that action at this time.
0 commit comments