Hi Louis,
There is a lot of very good work on your library.
I have some comments in relation on how I have implemented Type Classes
in my prototype.
About datatype<T>. The library proposes type classes and data types. The
name datatype_t<> is confusing as the datatype<T> meta-functions must
not return one of the defined data types. I see it much more as a
category, which is used to map the data type to a category used as
parameter of the instantiation
TC::Instance.
In addition, I wonder if the category associated shouldn't depend on the
type class we want to map.
TC::Instance>
About naming: Haskell doesn't have namespaces and all the functions are
at the same scope. Your library makes use of a lot of non-member
functions, and so name clashing must be avoided. What about moving all
the non-member functions of the Type Class to a specific namespace? E.g.
struct Monad { ... };
namespace monad {
using namespace applicatives;
... bind()
};
The use would need to use the type class namespace explicitly
auto x = monad::bind(m, f)
or introduce the namespace of the type class
using namespace monad;
auto x = bind(m, f);
Best,
Vicente