Commits

camlspotter committed 0dc32a5

phantom unknown handling

Comments (0)

Files changed (4)

   val recursive : ('a typ -> 'b typ) -> 'b typ
     (** [recursive f] returns a recusive type defined by [f] *)
 
-  (* size_of requires Lvalue.v, so defined in Lvalue.
+  (* size_ofs require Lvalue.v, so defined in Lvalue. They are lated exposed in Lwrap.Type.
+     val size_i64_of : 'a typ -> i64 v
      val size_of : 'a typ -> i32 v
   *)
 end 
+type unknown = Phantom_intf.unknown
+
 module Make(M : sig type t end) = struct
 
-  type unknown = Phantom_intf.D.unknown
-  let unknown = Obj.magic 0 (* !! *)
+  type unknown = Phantom_intf.unknown
+  let unknown = Phantom_intf.Unknown.unknown
 
   type elt = M.t
   type 'a t = elt
-module Make(M : sig type t end) : Phantom_intf.S with type elt = M.t and type 'a t = M.t
+type unknown = Phantom_intf.unknown
+    (** abstract type for the tag for "unknown phantom" *)
+
+module Make(M : sig type t end) : Phantom_intf.S 
+  with type elt = M.t 
+  and  type 'a t = M.t
+
-module D = struct
+(* a stupid way to avoid recursion in type definition syntax *)
+module Unknown : sig 
   type unknown
+  val unknown : unknown
+end = struct
+  type unknown = unit 
+  let unknown = ()
 end
 
+type unknown = Unknown.unknown
+
 module type S = sig
   type elt
   type 'a t
   type 'a ts
 
-  type unknown = D.unknown
+  type unknown = Unknown.unknown 
   val unknown : unknown
 
   val of_list : 'a t list -> 'a ts