diff --git a/src/version.ml b/src/version.ml index 89f523077..c5ff7de01 100644 --- a/src/version.ml +++ b/src/version.ml @@ -1 +1 @@ -let version = "Version 1.00, cc9f3d0ed, Tue Aug 25 23:21:39 2020 +0300" +let version = "Version 1.00, f81a63865, Wed Aug 26 00:27:42 2020 +0300" diff --git a/stdlib/Ostap.lama b/stdlib/Ostap.lama index 71fb2b551..96bf087ef 100644 --- a/stdlib/Ostap.lama +++ b/stdlib/Ostap.lama @@ -43,12 +43,12 @@ public fun memo (f) { if log then printf ("Applying memoized parser to %s\n", s.string) fi; case findMap (deref (t), s) of None -> - t ::= addMap (deref (t), s, [addSet (emptySet (compare), k), emptySet (compare)]); + t ::= addMap (deref (t), s, [addSet (emptySet (compare), k), emptySet (fun (r1, r2) {case [r1, r2] of [Fail (_, _, _), Fail (_, _, _)] -> 0 | _ -> compare (r1, r2) esac })]); f (fun (r) { r := lookupMemo (restab, r); if log then printf ("Running continuation with result %s\n", r.string) fi; case findMap (deref (t), s) of - Some ([ks, rs]) -> + Some ([ks, rs]) -> if memSet (rs, r) then skip else