Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 93fa2d5d authored by Valentin Blot's avatar Valentin Blot
Browse files

Optimized extraction

parent bee5b44c
No related branches found
No related tags found
No related merge requests found
...@@ -965,9 +965,24 @@ rewrite form_to_type_substt. ...@@ -965,9 +965,24 @@ rewrite form_to_type_substt.
reflexivity. reflexivity.
Qed. Qed.
Extract Inductive unit => "unit" [ "()" ]. Extraction Inline id.
Extract Inductive bool => "bool" [ "true" "false" ]. Extract Inductive bool => "bool" [ "true" "false" ].
Extract Inductive list => "list" [ "[]" "(::)" ]. Extract Inductive list => "list" [ "[]" "(::)" ].
Extract Inlined Constant List.map => "List.map".
Extract Inlined Constant List.nth => "(fun n l d -> match List.nth_opt l n with Some a -> a | None -> d)".
Extract Inlined Constant List.fold_right => "(fun f a l -> List.fold_right f l a)".
Extract Inductive prod => "(*)" [ "(,)" ]. Extract Inductive prod => "(*)" [ "(,)" ].
Extract Inlined Constant fst => "fst".
Extract Inlined Constant snd => "snd".
Extract Inductive sigT => "(*)" ["(,)"].
Extract Inlined Constant projT1 => "fst".
Extract Inlined Constant projT2 => "snd".
Extract Inductive option => "option" [ "Some" "None" ]. Extract Inductive option => "option" [ "Some" "None" ].
Extraction "f.ml" term_equal bound term1 term2. Extract Inductive nat => int [ "0" "succ" ] "(fun fO fS n -> if n=0 then fO () else fS (n-1))".
Extract Inlined Constant pred => "pred".
Extract Inlined Constant Init.Nat.sub => "(fun m n -> m - n)".
Extract Inlined Constant Nat.eqb => "(fun m n -> m = n)".
Extract Inlined Constant Nat.leb => "(fun m n -> m <= n)".
Extract Inlined Constant Nat.ltb => "(fun m n -> m < n)".
Extract Inlined Constant Nat.compare => "(fun m n -> if m < n then Lt else if m > n then Gt else Eq)".
Extraction "f.ml" term_equal bound type1 term1 type2 term2.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment