summaryrefslogtreecommitdiff
path: root/src/Substitute.ml
diff options
context:
space:
mode:
authorSon Ho2021-11-29 17:53:32 +0100
committerSon Ho2021-11-29 17:53:32 +0100
commita16b9148a063fac9b0d9268d24926bcc374c5cb2 (patch)
tree53b7c31402e4af5cfef0d1fddcc7dfae0729f34e /src/Substitute.ml
parent9ea199e7e255000ecc84062165df0a8943c2fbfa (diff)
Make various improvements in Print
Diffstat (limited to '')
-rw-r--r--src/Substitute.ml18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/Substitute.ml b/src/Substitute.ml
index 8cb92587..cad61595 100644
--- a/src/Substitute.ml
+++ b/src/Substitute.ml
@@ -51,24 +51,6 @@ let make_type_subst (var_ids : T.TypeVarId.id list) (tys : 'r T.ty list) :
in
fun id -> T.TypeVarId.Map.find id mp
-(** Retrieve the list of fields for the given variant of a [type_def].
-
- Raises [Invalid_argument] if the arguments are incorrect.
-
- TODO: move
- *)
-let type_def_get_fields (def : T.type_def)
- (opt_variant_id : T.VariantId.id option) : T.field T.FieldId.vector =
- match (def.kind, opt_variant_id) with
- | Enum variants, Some variant_id ->
- (T.VariantId.nth variants variant_id).fields
- | Struct fields, None -> fields
- | _ ->
- raise
- (Invalid_argument
- "The variant id should be [Some] if and only if the definition is \
- an enumeration")
-
(** Instantiate the type variables in an ADT definition, and return the list
of types of the fields for the chosen variant *)
let type_def_get_instantiated_field_type (def : T.type_def)