Skip to content

Commit e4ae0b8

Browse files
committed
use IM.intersection instead of IM.filterWithKey for implementing restrictKeys
1 parent 9e6ba0f commit e4ae0b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DFAMin.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Data.Foldable (foldl')
2121
#if __GLASGOW_HASKELL__ >= 802
2222
restrictKeys = IM.restrictKeys
2323
#else
24-
restrictKeys m s = IM.filterWithKey (\k _ -> IS.member k s) m
24+
restrictKeys m s = IM.intersection m (IM.fromSet (const ()) s)
2525
#endif
2626

2727
-- Hopcroft's Algorithm for DFA minimization (cut/pasted from Wikipedia):

0 commit comments

Comments
 (0)