
22 Apr
2003
22 Apr
'03
7:12 p.m.
On Tue, 22 Apr 2003, Derek Elkins wrote:
I had a similar problem, but that was because I needed to use the constructors. MonadState has the methods you are using just write your code requiring MonadState as both State and StateT are instances.
next_random_probability :: ( ..., MonadState g m) => m a (snip)
Works perfectly, thanks very much! That must be the only combination I didn't try. (-:
When you have two identical methods like this, you can try removing the type from one and seeing what hugs or ghci thinks the type is. Then, you can specialize that if you want.
No doubt it'll all be clearer when I better understand what's going on!
Jon Cast