summaryrefslogtreecommitdiff
path: root/compiler/Extract.ml
diff options
context:
space:
mode:
authorSon Ho2023-09-03 15:18:36 +0200
committerSon Ho2023-09-03 15:18:36 +0200
commitb42c0a8fa4708d6bf8424d63b6a7fe4964ba0e3d (patch)
tree5d1c87cbc924de09fafae1823f9e0e7563ff48d6 /compiler/Extract.ml
parent0cafb31dd42c95f22e0b6680531c27fa0508e376 (diff)
Make progress on the extraction
Diffstat (limited to '')
-rw-r--r--compiler/Extract.ml13
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler/Extract.ml b/compiler/Extract.ml
index ad89a59e..e07305f1 100644
--- a/compiler/Extract.ml
+++ b/compiler/Extract.ml
@@ -1301,7 +1301,8 @@ and extract_trait_instance_id (ctx : extraction_ctx) (fmt : F.formatter)
let name = ctx_get_trait_item_clause decl_id item_name clause_id ctx in
extract_trait_instance_id ctx fmt no_params_tys true inst_id;
F.pp_print_string fmt ("." ^ name)
- | TraitRef trait_ref -> extract_trait_ref ctx fmt no_params_tys true trait_ref
+ | TraitRef trait_ref ->
+ extract_trait_ref ctx fmt no_params_tys inside trait_ref
| UnknownTrait _ ->
(* This is an error case *)
raise (Failure "Unexpected")
@@ -3774,6 +3775,16 @@ let extract_global_decl (ctx : extraction_ctx) (fmt : F.formatter)
(* Add a break to insert lines between declarations *)
F.pp_print_break fmt 0 0
+(** Extract a trait declaration *)
+let extract_trait_decl (ctx : extraction_ctx) (fmt : F.formatter)
+ (trait_decl : trait_decl) : unit =
+ raise (Failure "TODO")
+
+(** Extract a trait implementation *)
+let extract_trait_impl (ctx : extraction_ctx) (fmt : F.formatter)
+ (trait_impl : trait_impl) : unit =
+ raise (Failure "TODO")
+
(** Extract a unit test, if the function is a unit function (takes no
parameters, returns unit).