diff options
| author | Krasimir Angelov <kr.angelov@gmail.com> | 2018-11-30 12:18:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-30 12:18:24 +0100 |
| commit | fdc5659f800bc37c51e3ddbdfdd0c8f3febb6b6c (patch) | |
| tree | d1e817ac40effc2bae2cca0bb07b393b6e7d2a77 /src/runtime/haskell/PGF/Parse.hs | |
| parent | f898c250baf0d94f99b60bbf155c887442e40775 (diff) | |
| parent | 4d34c7f66b1783423387c9dae359bd38f64426dd (diff) | |
Merge pull request #19 from MUSTE-Project/master
Fix deprecations from containers >= 0.4.0.0
Diffstat (limited to 'src/runtime/haskell/PGF/Parse.hs')
| -rw-r--r-- | src/runtime/haskell/PGF/Parse.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/haskell/PGF/Parse.hs b/src/runtime/haskell/PGF/Parse.hs index 51b1d3273..d4df937db 100644 --- a/src/runtime/haskell/PGF/Parse.hs +++ b/src/runtime/haskell/PGF/Parse.hs @@ -198,7 +198,7 @@ recoveryStates open_types (EState abs cnc chart) = Nothing -> []
complete open_fcats items ac =
- foldl (Set.fold (\(Active j' ppos funid seqid args keyc) ->
+ foldl (Set.foldr (\(Active j' ppos funid seqid args keyc) ->
(:) (Active j' (ppos+1) funid seqid args keyc)))
items
[set | fcat <- open_fcats, (set,_) <- lookupACByFCat fcat ac]
@@ -363,7 +363,7 @@ process flit ftok cnc (item@(Active j ppos funid seqid args key0):items) acc cha items2 = case lookupAC key0 ((active chart:actives chart) !! (k-j)) of
Nothing -> items
- Just (set,sc) -> Set.fold (\(Active j' ppos funid seqid args keyc) ->
+ Just (set,sc) -> Set.foldr (\(Active j' ppos funid seqid args keyc) ->
let SymCat d _ = unsafeAt (unsafeAt (sequences cnc) seqid) ppos
PArg hypos _ = args !! d
in (:) (Active j' (ppos+1) funid seqid (updateAt d (PArg hypos fid) args) keyc)) items set
@@ -395,7 +395,7 @@ process flit ftok cnc (item@(Active j ppos funid seqid args key0):items) acc cha predict flit ftok cnc forest key0 key@(AK fid lbl) k acc items =
let (acc1,items1) = case IntMap.lookup fid forest of
Nothing -> (acc,items)
- Just set -> Set.fold foldProd (acc,items) set
+ Just set -> Set.foldr foldProd (acc,items) set
(acc2,items2) = case IntMap.lookup fid (lexicon cnc) >>= IntMap.lookup lbl of
Just tmap -> let (mb_v,toks) = TrieMap.decompose (TrieMap.map (toItems key0 k) tmap)
|
