Goal True /\ False. split. let r := ref 0 in
enter (fun () => if Int.equal (get r) 0 then incr r; exact I else ()). all: if Int.equal (numgoals()) 1 then () else throw Error. Abort.
shelve (). all: if Int.equal (numgoals()) 0 then () else throw Error. Abort.
Goalexists n, n = 0.
shelve_unifiable ().
Notations.unshelve eexists. all:shelve_unifiable (). all: if Int.equal (numgoals()) 1 then () else throw Error. exact (eq_refl 0). Qed.
Goal True. let c := '(_ :> nat) in match Constr.Unsafe.kind c with
| Constr.Unsafe.Evar ev _ => new_goal ev
| _ => throw Error end. exact I. exact 0. Qed.
Goal 3 = 3 -> 1 = 1 /\ 2 = 2. intros H. split.
Fail all: let _ := goal () in ().
Fail all: let _ := hyps () in ().
Fail all: let _ := hyp @H in ().
reflexivity.
if Constr.equal (goal()) '(2 = 2) then () else throw Error. if Constr.equal (hyp @H) '&H then () else throw Error.
Fail let _ := hyp @X in (). pose (X := 2). if Constr.equal (hyp @X) '&X then () else throw Error.
if Option.equal Constr.equal (hyp_value @H) None then () else throw Error. if Option.equal Constr.equal (hyp_value @X) (Some '2) then () else throw Error.
Ltac2 Eval hyps(). match hyps () with
| [ (h, None, hty); (x, Some xbdy, xty) ] => if Ident.equal h @H then () else throw Error; if Constr.equal hty '(3 = 3) then () else throw Error; if Ident.equal x @X then () else throw Error; if Constr.equal xbdy '2 then () else throw Error; if Constr.equal xty 'nat then () else throw Error
| _ => throw Error end.
Ltac2 Eval matchcase (fun () => '(1 + tt)) with
| Err (Internal e) => let _ := clear_err_info e in ()
| _ => throw Error end.
Ltac2 Eval timeout 1 (fun () => ()).
(* I don't think we can currently get values of type float without going through constr primitive floats (no ltac2 parsing for float literals)
so skipping testing for timeoutf *)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.