Safe Haskell | Safe-Inferred |
---|
Documentation
class Dual r s | r -> s, s -> rSource
(:?:)| are declared right associative and with higher precedence than |(:+:)| and |(:&:)|.}
If the process on one end of a channel speaks a particular protocol, its correspondant at the other end of the channel must be prepared to understand it. For example, if one process speaks |Int :!: Bool :?: Eps|, the other process must implement the dual protocol |Int :?: Bool :!: Eps|. We encode the duality relation using a type class with multiple parameters and functional dependencies citep{Jones1997Type,Jones2000Type}.