(* test copied from ocaml's fragile_matching.ml test as of ocaml b02c7ca08 *)
RequireImport Ltac2.Ltac2.
(* Tests for stack-overflow crashes caused by a combinatorial
explosition in fragile pattern checking. *)
Module SyntheticTest.
Ltac2 Type t := [ A | B ].
Ltac2 f x := match x with
| A,A,A,A,A, A,A,A,A,A, A,A,A,A,A, A,A,A => 1
| (A|B),(A|B),(A|B),(A|B),(A|B),
(A|B),(A|B),(A|B),(A|B),(A|B),
(A|B),(A|B),(A|B),(A|B),(A|B),
(A|B),(A|B),(A|B) => 2 end.
End SyntheticTest.
Module RealCodeTest. (* from Alex Fedoseev *)
Ltac2 Type ('a,'b) result := [ Ok ('a) | Err ('b) ].
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 und die Messung sind noch experimentell.