This doesn't use any hana features, but should work.
First, a transcribe
type function that takes a template, and an instance of a different template, and transcribes the types in the second into the first:
template<template<class...>class To, class From>
struct transcribe;
template<template<class...>class To, class From>
using transcribe_t=typename transcribe<To,From>::type;
template<template<class...>class Z, template<class...>class Src, class...Ts>
struct transcribe<Z, Src<Ts...>> {
using type=Z<Ts...>;
};
Now, a template that takes types, and returns a hana tuple of hana types:
template<class...Ts>
using tuple_of_types = boost::hana::tuple<boost::hana::type<Ts>...>;
And we are done:
template<class Src>
using get_types_from = transcribe_t< tuple_of_types, Src >;
using result = get_types_from< my_variant >;
get_types_from
is because a type function that extracts the template arguments of an arbitrary template seems useful.