mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 11:19:32 -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:
@@ -57,7 +57,7 @@ pgfToCFG pgf lang = mkCFG (showCId (lookStartCat pgf)) extCats (startRules ++ co
|
||||
|
||||
topdownRules cat = f cat []
|
||||
where
|
||||
f cat rules = maybe rules (Set.fold g rules) (IntMap.lookup cat (productions cnc))
|
||||
f cat rules = maybe rules (Set.foldr g rules) (IntMap.lookup cat (productions cnc))
|
||||
|
||||
g (PApply funid args) rules = (cncfuns cnc ! funid,args) : rules
|
||||
g (PCoerce cat) rules = f cat rules
|
||||
|
||||
Reference in New Issue
Block a user