hlist
An heterogeneous list, mainly used to operate on transactions.
An heterogeneous list, mainly used to operate on transactions.
Highly inspired by Shapeless machinery but very much lightweight.
Type members
Classlikes
It witnesses a relationship between two HLists.
It witnesses a relationship between two HLists.
The existing instances model a relationship between an HList comformed of actions F[A] and results A. E.g.:
val actions: IO[Unit] :: IO[String] :: HNil = IO.unit :: IO.pure("hi") :: HNil
val results: actions.R = () :: "hi" :: HNil
A Witness[IO[Unit] :: IO[String] :: HNil] proves that its result type can only be Unit :: String :: HNil.
A Witness is sealed to avoid the creation of invalid instances.
- Companion
- object