Computes the type for f*g (actor composition). More...
(Note that these are not member functions.)
|template<class F , class G >|
|using||composed_type_t = typename composed_type< G, F, F, detail::type_list<>>::type|
|Convenience type alias. |
Computes the type for f*g (actor composition).
~~~ let output_type x = case x of Stream y -> y ; Single y -> y
let propagate_stream from to = case from of Stream _ -> Stream (output_type to) Single _ -> to let composed_type f g = [(fst x, propagate_stream (snd x) (snd y)) | x <- g, y <- f, output_type (snd x) == fst y]
This class implements the list comprehension above in a single shot with worst case n*m template instantiations using an inner and outer loop, where n is the size of Xs and m the size of Ys. Zs is a helper that models the "inner loop variable" for generating the cross product of Xs and Ys. The helper function propagate_stream is integrated into the loop with four cases for the matching case. Rs collects the results.