Am Donnerstag, 24. November 2005 21:52 schrieb Fan Wu:
> > They cannot belong to the same monad.  If s is the state type and m1' and
> > m2' belong to the monad m then m1 and m2 belong to the monad StateT s m.
>
> I know it looks insane, I'm just trying to make a recursive case of
> it: technically it's still possible to have a StateT monad as the m in
> "StateT s m" right?

Yes, but this StateT type application cannot be equal to the outer StateT type 
application because this would result in an infinite type which Haskell 
doesn't support. Example:

        StateT Int (StateT Int (StateT Int ...))

> Thanks,
> Fan

Best wishes,
Wolfgang
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to