turion / rhine

Haskell Functional Reactive Programming framework with type-level clocks
http://hackage.haskell.org/package/rhine
123 stars 21 forks source link

Find a way to use `fold` etc. on lists of different clocks #5

Open turion opened 7 years ago

turion commented 7 years ago

The following wouldn't type check:

clocks = [Millisecond 10, Millisecond 100]

But it would be practical, e.g. to fold a large number of behaviours over several clocks etc.

turion commented 6 years ago

@ivanperez-keera do you have a recommendation/opinion/idea here?

ivanperez-keera commented 6 years ago

Haven't checked, but I suspect this might type-check with indexed monads or with some other form of monad/foldable that uses a monoidal operation on an index. See the work by Jan Bracker on supermonads.