Thanks to Amr A Sabry for showing the error in my reasoning and thanks to
John Launchburry for clarifying the reason of this at first strange example.
It helped me a lot about understanding better rank 2 polymorphism.

Jan

----- Original Message -----
From: John Launchbury <[EMAIL PROTECTED]>
To: Jan Brosius <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, July 19, 1999 6:31 PM
Subject: Re: typing error?


> Jan Brosius wrote:
>
> > 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)
> >
>
> I think you mean page 10...
>
> The typing given for f is an instance of the more general typing you gave.
The intent was to show that the s-types were not special in any way, and
that state threads could manipulate state structures belonging to other
threads. There are less contrived examples which are not mere instances of
more general polytypes.
>
> John
>




Reply via email to