you could also make runST core dump --- but you don't do that.
maybe someone can answer this.
why cant runSt have the following type:
runST All a . (Cxt1..Cxtn) => (All s . ST s a) -> a
?
byron
On Fri, 20 Mar 1998, Alastair Reid wrote:
>
> Byron Cook <[EMAIL PROTECTED]> writes:
> > What is your opinion, should this typecheck?
> >
> > import LazyST
> > f = runST ( return 5 )
> >
> > I do.
> > Hugs doesnt:
> > *** expression : runST (return 5)
> > *** term : return 5
> > *** type : Num _3 => ST b _3
> > *** does not match : ST c _3
> > *** because : types do not match
> >
> > Is it a bug?
>
> Given that the Haskell report doesn't runST, Hugs is pretty much free to
> do what it wants. I believe this is the expected behaviour. That is,
> it's what the original runST paper described and therefore what Mark Jones
> implemented.
>
> In this case, it's easy enough to workaround - though I can imagine
> cases where that wouldn't be true.
>
>
> Alastair
>
> ps Is there any particular reason not to use the January 1998 release?
>
> pps The story is probably completely different if you use the new Hugs
> typechecker in Hugs 1.3c since the new typechecker is supposed to be
> more compatible with GHC. (Of course, Hugs 1.3c doesn't include
> modules and other features added here at Yale.)
>