| |
let ftv_type t =
let ftv = ref [] in
let visited = marker() in
let rec visit t =
let t = repr t in
if t.mark = visited then ()
else
begin
t.mark <- visited;
match desc t with
| Tvar _ -> ftv := t::!ftv
| Tcon (g, l) -> List.iter visit l
end in
visit t; !ftv;; |
|