Hi,

I have read the online postscript paper " Lazy Functional State Threads".
I think the typing (page 4)

f :: MutVar s a -> Mutvar s a

is wrong, since the definition of  f  is :

f v = runST ( newVar v 'thenST'  \w ->
                      readVar w)

and since newVar is typed as:

newVar :: a -> ST s (MutVar s a)

hence  v  is of type  a. Furthermore runST has type

runST :: (forall s.  ST s a) -> a

hence  f v  can't have the type " MutVar s a ". If I understand well  the
definition of  f v ,thenST and  readVar  (see above)  , f v  must have type
a.

Thanks for any comments.

Jan







Reply via email to