
23 Apr
2003
23 Apr
'03
9:09 a.m.
On Tue, 22 Apr 2003, Jon Cast wrote: (snip)
Ah, yes the good old monomorphism restriction. Should have thought about that. The way around this is to make the declaration a function:
next_random_probability () = (snip)
Wow, bizarre. Thanks! (And also to Alastair and Derek.) I didn't realise that my example uses multiparameter typeclasses - maybe that's why I've had difficulty using the state monads, because I hadn't studied multiparameter typeclasses, I'd just recognised that something new-to-me was going on. -- Mark