let rec type_parameters t acc =
match t with
| Ast.TyApp (_, t1, t2) ->
type_parameters t1 (type_parameters t2 acc)
| Ast.TyQuP (_, s) -> (s, (true, false)) :: acc
| Ast.TyQuM (_, s) -> (s, (false, true)) :: acc
| Ast.TyQuo (_, s) -> (s, (false, false)) :: acc
| _ -> assert false