let arg_types tenv t = let a = symbol tenv (TName "->") in let rec chop acu = function | TTerm (App (TTerm (App (v, t)), u)) when v = a -> chop (t :: acu) u | x -> acu in List.rev (chop [] t)