generalize feedback to any foldable monoid

This commit is contained in:
Marco Perone 2023-01-31 17:21:49 +01:00 committed by Marco Perone
parent 10eb33e6fb
commit 9ad45158fb

View File

@ -40,9 +40,10 @@ data StateMachineT m input output where
-> StateMachineT m c d
-> StateMachineT m (Either a c) (Either b d)
Feedback
:: StateMachineT m a [b]
-> StateMachineT m b [a]
-> StateMachineT m a [b]
:: (Foldable n, Monoid (n a), Monoid (n b))
=> StateMachineT m a (n b)
-> StateMachineT m b (n a)
-> StateMachineT m a (n b)
Kleisli
:: (Foldable n, Monoid (n c))
=> StateMachineT m a (n b)