[Haskell-cafe] Delaling with State StateT and IO in the same function

Alfonso Acosta alfonso.acosta at gmail.com
Mon Feb 26 18:42:57 EST 2007


On 2/27/07, Kirsten Chevalier <catamorphism at gmail.com> wrote:
> So what if you changed your netlist function so that the type
> sig would be:
>
> netlist :: DT.Traversable f =>
>           (State s (S HDPrimSignal) -> State s  v ) -> -- new
>           (State s (Type,v) -> S v -> State s ())   -> -- define
>           State s (f HDPrimSignal) ->                  -- the graph
>           IO (State s ())
>

> Or why not:
>
> netlist :: DT.Traversable f =>
>           (State s (S HDPrimSignal) -> State s  v ) -> -- new
>           (State s (Type,v) -> S v -> State s ())   -> -- define
>           State s (f HDPrimSignal) ->                  -- the graph
>           IO s
>

Uhm, this looks better, I'll try with this one and see what I get, I
anyway suspect I'll have a hard time because of the nested monads


More information about the Haskell-Cafe mailing list