mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-08 18:52:50 -06:00
Fix deprecations from containers >= 0.4.0.0
E.g. `foldWithKey` has been deprecated since 0.4.0.0 (November 2010)[1] and has been removed in 0.6.0.1 (2018)[2] [1]: https://github.com/haskell/containers/blob/master/changelog.md#0400--nov-2010 [2]: https://github.com/haskell/containers/blob/master/changelog.md#death-of-deprecated-functions (commit originally by @fredefox)
This commit is contained in:
@@ -185,8 +185,8 @@ filterProductions prods0 prods
|
||||
| prods0 == prods1 = prods0
|
||||
| otherwise = filterProductions prods1 prods
|
||||
where
|
||||
prods1 = IntMap.foldWithKey foldProdSet IntMap.empty prods
|
||||
hoc = IntMap.fold (\set !hoc -> Set.fold accumHOC hoc set) IntSet.empty prods
|
||||
prods1 = IntMap.foldrWithKey foldProdSet IntMap.empty prods
|
||||
hoc = IntMap.foldr (\set !hoc -> Set.foldr accumHOC hoc set) IntSet.empty prods
|
||||
|
||||
foldProdSet fid set !prods
|
||||
| Set.null set1 = prods
|
||||
@@ -204,7 +204,7 @@ filterProductions prods0 prods
|
||||
accumHOC _ hoc = hoc
|
||||
|
||||
splitLexicalRules cnc p_prods =
|
||||
IntMap.foldWithKey split (IntMap.empty,IntMap.empty) p_prods
|
||||
IntMap.foldrWithKey split (IntMap.empty,IntMap.empty) p_prods
|
||||
where
|
||||
split fid set (lex,syn) =
|
||||
let (lex0,syn0) = Set.partition isLexical set
|
||||
|
||||
Reference in New Issue
Block a user