
13 May
2009
13 May
'09
2:05 a.m.
Daryoush Mehrtash wrote:
What is the difference between forall as in:
runST :: (forall s. ST s a) -> a
and the "=>" as in
evalStateT :: Monad m => StateT s m a -> s -> m a
The forall is Rank-2 polymorphism (the argument must be polymorphic in s). The => is for typeclass constraints (restricting the Rank-1 polymorphism on m, but not so far as to make it monomorphic). Or did you have another question in mind? -- Live well, ~wren