polymorphic type in state of state monad

Wang Meng wangmeng@comp.nus.edu.sg
Tue, 11 Mar 2003 01:25:52 +0800 (GMT-8)


Hi All,

Any one of your have the experience of defining a state of a state monad
as a polymorphic type?
I want to have:

> type State = Term a => [a]
> data M a = M (State -> IO(State,a))

GHC yields a error message "Illegal polymorphic type".
How to resolve this?

Thank you very much.
  
 -W-M-
  @ @  
   |
  \_/