These are chat archives for boostorg/hana

10th
Mar 2017
Jason Rice
@ricejasonf
Mar 10 2017 20:22
@ldionne Have you considered making hana::type a hana::Functor?
Louis Dionne
@ldionne
Mar 10 2017 20:56
Hmmm. I don’t think it is a functor, is it?
hana::type_tag is not a higher order data-type.
Instead, there are the template_, metafunction & al helpers.
Jason Rice
@ricejasonf
Mar 10 2017 21:07
This is not a big deal, and maybe it wouldn't work as a Functor. idk
hana::transform(some_tuple_type{}, hana::back);

hana::typeid_(hana::back(std::declval<typename some_tuple_type::type>()));
Louis Dionne
@ldionne
Mar 10 2017 21:16
Interesting. I don’t think hana::transform is the right way to do this, but we could have another function, perhaps?
Something like
template <typename T, typename F>
constexpr auto on_declval(hana::basic_type<T>, F f) {
  return hana::type<decltype(f(std::declval<T>()))>{};
}
But need a better name.
Jason Rice
@ricejasonf
Mar 10 2017 21:32
:+1: think of all the typenames that will be saved :P
Louis Dionne
@ldionne
Mar 10 2017 22:03
Any idea for a good name? Can you create an issue please? Else, I will forget.
Jason Rice
@ricejasonf
Mar 10 2017 22:41
transform_type ??