module A : sig
type t
val of_int : int -> t
val print_t : t -> unit
end = struct
type t = T of int [@@unboxed]
let of_int i = T i
let print_t (T i) = print_int i
end
This will behave as if you wrote:
module A : sig
type t
val of_int : int -> t
val print_t : t -> unit
end = struct
type t = int
let of_int i = i
let print_t i = print_int i
end
So yes, the type is still unboxed.