moduleFilter.MonadFixwhereimportqualifiedFilter.GraphasGraphimportqualifiedFilter.FixasFFiximportFilter.Fix(Channel(Channel),ChannelId)importControl.Monad.State(StateT,evalStateT,get,modify,lift)importControl.Monad.Writer(Writer,execWriter,tell){-|
If you find 'Filter.Fix.T' still inconvenient,
and if you don't care about portability,
you can also use the following monad with the @mdo@ notation.
> mdo
> v <- a·(u + d·w)
> w <- b·(v + e·y)
> y <- c· w
-}typeTfiltertavx=StateTChannelId(Writer[Channelfiltertav])xmakeChannel::[(ChannelId,filtertav)]->TfiltertavChannelIdmakeChannelinputs=don<-getmodifysucclift$tell[Channelninputs]returnnrun::Tfiltertavx->[Channelfiltertav]runm=execWriter(evalStateTm0)toGraph::Tfiltertavx->Graph.TfilterInttavtoGraph=Graph.fromList.map(\(Channelninputs)->(n,inputs)).run