
26 Feb
2007
26 Feb
'07
6:26 p.m.
On 2/27/07, Kirsten Chevalier
I may be missing something, but why are you using both State and StateT? Maybe I don't understand your code, but it seems like you could be using StateT everywhere you're currently using State.
Well, as far as I know using "StateT s IO a" for the input functions would force the state and value of their monad to stay within IO. That restriction dissapears by using barely "State s a"
Also, your type signatures would be easier to read if you defined a type synonym for your instantiation of StateT, e.g.:
type AlfonsoM s = StateT s IO ()
and then everywhere you write (StateT s IO ()) now, you could write (AlfonsoM s) instead.
Thanks for the suggestion, I'll make use of it :)