SSoelvsten/adiar

Type Aliases for Generators and Predicates

SSoelvsten opened this issue · 0 comments

Currently, the public API is using std::function<...> in many places. We should replace std::function with a adiar::function alias, such that we can (if need be) implement our own alternative to std::function (for example, #200 might call for it).

  • std::function<...> -> adiar::function<...>

Furthermore, it is hard to figure out what the purpose of the function is merely based on the type (without reading the documentation). We ought to provide much easier to read type aliases:

  • std::function<bool(label_t) -> adiar::predicate<label_t>
  • std::function<void(label_t) -> adiar::consumer<label_t>
  • std::function<label_t() -> adiar::coroutine<label_t> or adiar::producer<label_t>