Generalise #62 in such a way that arbitrary clock trees can be hoisted. Two problems occur:
This changes the type of the clock, which suggests a type family type HoistedClock SequentialClock cl1 cl2 = SequentialClock (HoistedClock cl1) (HoistedClock cl2).
It's hard to define functions on type families, i.e. see https://github.com/turion/rhine/pull/61/files#r190572641 . It seems there can't be a function hoistedClock :: (forall a . m a -> m' a) -> cl -> HoistedClock m m' cl with a type family as described above.
Possibly the types SequentialClock and ParallelClock and the whole type family business should be given up in favour of a data kind representing clock trees. (I have some notes in that direction which don't compile fully yet.)
Generalise #62 in such a way that arbitrary clock trees can be hoisted. Two problems occur:
type HoistedClock SequentialClock cl1 cl2 = SequentialClock (HoistedClock cl1) (HoistedClock cl2)
.hoistedClock :: (forall a . m a -> m' a) -> cl -> HoistedClock m m' cl
with a type family as described above.Possibly the types
SequentialClock
andParallelClock
and the whole type family business should be given up in favour of a data kind representing clock trees. (I have some notes in that direction which don't compile fully yet.)