Skip to content

Commit

Permalink
Ltac2: Take some small APIs from rewriter (fst/snd)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkySkimmer committed Jan 22, 2024
1 parent 3298e47 commit 24067ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions user-contrib/Ltac2/Init.v
Expand Up @@ -41,6 +41,11 @@ Ltac2 Type ('a, 'b, 'c, 'd) format.
Ltac2 Type exn := [ .. ].
Ltac2 Type 'a array.

(** Tuples *)

Ltac2 fst (p:'a * 'b) : 'a := let (x,_) := p in x.
Ltac2 snd (p:'a * 'b) : 'b := let (_,y) := p in y.

(** Pervasive types *)

Ltac2 Type 'a option := [ None | Some ('a) ].
Expand Down

0 comments on commit 24067ea

Please sign in to comment.