diff options
| author | Pierre-Marie Pédrot | 2017-08-01 02:03:30 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2017-08-01 02:03:30 +0200 |
| commit | 21087463e0a14bd101e01683c6dd7850fcccb395 (patch) | |
| tree | 36762623aad9619ee63e4362d19683dcaca52028 | |
| parent | 60e581f6fbcf033e134291016351492d9df7e319 (diff) | |
Fixup doc
| -rw-r--r-- | doc/ltac2.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/ltac2.md b/doc/ltac2.md index e2aa4cfb3b..abd5493cec 100644 --- a/doc/ltac2.md +++ b/doc/ltac2.md @@ -263,6 +263,8 @@ is an evaluation context. ``` E[throw e] ≡ throw e + +(e value) ``` There is currently no way to catch such an exception and it is a design choice. @@ -286,7 +288,7 @@ If one sees thunks as lazy lists, then `zero` is the empty list and `plus` is list concatenation, while `case` is pattern-matching. The backtracking is first-class, i.e. one can write -`plus "x" (fun () -> "y") : string` producing a backtracking string. +`plus "x" (fun () => "y") : string` producing a backtracking string. These operations are expected to satisfy a few equations, most notably that they form a monoid compatible with sequentialization. @@ -299,7 +301,7 @@ plus (plus t f) g ≡ plus t (fun e -> plus (f e) g) case (fun () -> zero e) ≡ Err e case (fun () -> plus (fun () -> t) f) ≡ Val t f -let x := zero e in u ≡ fail e +let x := zero e in u ≡ zero e let x := plus t f in u ≡ plus (fun () -> let x := t in u) (fun e -> let x := f e in u) (t, u, f, g, e values) |
