On 2/27/07, Kirsten Chevalier <[EMAIL PROTECTED]> wrote:

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 :)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to