Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ecPV.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ module PVMap = struct
Mnpv.find_opt (pvm m.pvm_env k) m.pvm_map

let raw m = m.pvm_map


end

(* -------------------------------------------------------------------- *)
Expand Down
5 changes: 4 additions & 1 deletion src/ecParser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -2991,7 +2991,10 @@ interleave_info:
{ Pinterleave info }

| CFOLD s=side? c=codepos n=word?
{ Pcfold (s, c, n) }
{ Pcfold (s, c, n, false) }

| CFOLD STAR s=side? c=codepos n=word?
{ Pcfold (s, c, n, true) }

| RND s=side? info=rnd_info c=prefix(COLON, semrndpos)?
{ Prnd (s, c, info) }
Expand Down
2 changes: 1 addition & 1 deletion src/ecParsetree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ type phltactic =
| Pcond of pcond_info
| Pmatch of matchmode
| Pswap of ((oside * pswap_kind) located list)
| Pcfold of (oside * pcodepos * int option)
| Pcfold of (oside * pcodepos * int option * bool) (* side + 1st inst + n lines + eager? *)
| Pinline of inline_info
| Poutline of outline_info
| Pinterleave of interleave_info located
Expand Down
13 changes: 13 additions & 0 deletions src/ecUtils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,19 @@ module List = struct
end

in fun state xs -> aux state [] xs

(* FIXME: REMOVE *)
let fold_left_map_filter_while (f: 'a -> 'b -> ('a * ('c option)) interruptible) =
let rec aux (state: 'a) (acc: 'c list) (xs : 'b list) =
match xs with
| [] -> (state, List.rev acc, [])
| y :: ys -> begin
match f state y with
| `Continue (state, Some y) -> aux state (y :: acc) ys
| `Continue (state, None) -> aux state acc ys
| `Interrupt -> (state, List.rev acc, xs)
end
in fun state xs -> aux state [] xs
end

(* -------------------------------------------------------------------- *)
Expand Down
4 changes: 4 additions & 0 deletions src/ecUtils.mli
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ module List : sig
('a -> 'b -> [`Interrupt | `Continue of 'a * 'c])
-> 'a -> 'b list -> 'a * 'c list * 'b list

val fold_left_map_filter_while :
('a -> 'b -> [`Interrupt | `Continue of 'a * ('c option)])
-> 'a -> 'b list -> 'a * 'c list * 'b list

(* ------------------------------------------------------------------ *)
val ksort:
?stable:bool -> ?rev:bool
Expand Down
Loading
Loading