fp_library/hkt/
apply.rs

1//! Convenience type aliases for the [`Kind` traits][crate::hkt::kinds].
2//!
3//! The naming convention used by these aliases is `ApplyNLMT` where `N`
4//! represents the number of lifetimes and `T` represents the number of
5//! generic types.
6//!
7//! If a [`Brand`][crate::brands] `FooBrand` for concrete type `Foo<A>`
8//! implements the [`Kind0L1T`] trait, then `Apply0L1T<FooBrand, ()>`
9//! represents `Foo<()>`.
10
11use crate::{
12	hkt::{Kind0L1T, Kind0L2T, Kind1L0T, Kind1L2T},
13	make_type_apply,
14};
15
16make_type_apply!(Apply0L1T, Kind0L1T, (), (A), "* -> *");
17
18make_type_apply!(Apply0L2T, Kind0L2T, (), (A, B), "* -> * -> *");
19
20make_type_apply!(
21  Apply1L0T,
22  Kind1L0T,
23  ('a),
24  (),
25  "' -> *"
26);
27
28make_type_apply!(
29	Apply1L2T,
30	Kind1L2T,
31	('a),
32	(A, B),
33	"' -> * -> * -> *"
34);