| | > 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?
I can tell you what it happening. If you have -fglasgow-exts on, the
type
for State is short for
type State = forall a.
G'day all.
On Tue, Mar 11, 2003 at 08:34:06AM +1300, Tom Pledger wrote:
> If, on the other hand, you want to vary the state type *during* a
> single monadic computation, it gets messy. You could try one of the
> following.
Very often, you just want to vary the state type for some portion
of the
Wang Meng writes:
| 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
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-