summaryrefslogtreecommitdiff
path: root/compiler/Config.ml
diff options
context:
space:
mode:
authorSon HO2023-12-07 15:02:44 +0100
committerGitHub2023-12-07 15:02:44 +0100
commitd4ebd6c1f0ba150e5e52d812d361189c89e43695 (patch)
tree4b3fa3d48c86ba379c78d01fca88d2084c2678c2 /compiler/Config.ml
parent9eb117dc9e94d1b04d24c87d278d014f456b2d89 (diff)
parent613496f6c76b3f8c7211ef5bc98e3cc170e45ed1 (diff)
Merge pull request #49 from AeneasVerif/son_merge_back
Allow the extraction of structures as tuples
Diffstat (limited to 'compiler/Config.ml')
-rw-r--r--compiler/Config.ml18
1 files changed, 17 insertions, 1 deletions
diff --git a/compiler/Config.ml b/compiler/Config.ml
index 364ef748..b09544ba 100644
--- a/compiler/Config.ml
+++ b/compiler/Config.ml
@@ -338,7 +338,7 @@ let type_check_pure_code = ref false
as far as possible while leaving "holes" in the generated code? *)
let fail_hard = ref true
-(** if true, add the type name as a prefix
+(** If true, add the type name as a prefix
to the variant names.
Ex.:
In Rust:
@@ -364,3 +364,19 @@ let fail_hard = ref true
]}
*)
let variant_concatenate_type_name = ref true
+
+(** If true, extract the structures with unnamed fields as tuples.
+
+ ex.:
+ {[
+ // Rust
+ struct Foo(u32)
+
+ // OCaml
+ type Foo = (u32)
+ ]}
+ *)
+let use_tuple_structs = ref true
+
+let backend_has_tuple_projectors () =
+ match !backend with Lean -> true | Coq | FStar | HOL4 -> false