summaryrefslogtreecommitdiff
path: root/src/Print.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/Print.ml')
-rw-r--r--src/Print.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Print.ml b/src/Print.ml
index e03efd94..c3c80da0 100644
--- a/src/Print.ml
+++ b/src/Print.ml
@@ -172,6 +172,7 @@ module Types = struct
in
let variants = String.concat "\n" variants in
"enum " ^ name ^ params ^ " =\n" ^ variants
+ | T.Opaque -> "opaque type " ^ name ^ params
end
module PT = Types (* local module *)
@@ -573,7 +574,7 @@ module Contexts = struct
fun def_id variant_id ->
let def = T.TypeDeclId.Map.find def_id ctx in
match def.kind with
- | Struct _ -> failwith "Unreachable"
+ | Struct _ | Opaque -> failwith "Unreachable"
| Enum variants ->
let variant = T.VariantId.nth variants variant_id in
name_to_string def.name ^ "::" ^ variant.variant_name