Commit cb9dad04 authored by Mário's avatar Mário

Extraction of abstract data types:

No longer extract an abstract type `t` (private + ghost fields) as
`type t = unit`. Instead, extract `t` as a type with no definition.
On the other hand, if `t` is a non-private type which happens to
have only ghost fields, this is still extracted as `type t = unit`.
parent 82c2eb65
......@@ -555,7 +555,9 @@ module Translate = struct
let pjl = filter_ghost_params p drecord_fields pjl in
begin match pjl with
| [] ->
ML.mk_its_defn id args is_private (Some (ML.Dalias ML.tunit))
let ty_def = if is_private then None
else Some (ML.Dalias (ML.tunit)) in
ML.mk_its_defn id args is_private ty_def
| [_, _, ty_pj] when is_optimizable_record_itd itd ->
ML.mk_its_defn id args is_private (Some (ML.Dalias ty_pj))
| pjl ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment