Mark,
Is the problem that Hugs gives runST a type rather than treating it as a
language construct? Can the latter be done easily?
John.
Mark P Jones wrote:
>
> | > why cant runSt have the following type:
> | >
> | > runST All a . (Cxt1..Cxtn) => (All s . ST s a) -> a
> |
> | It can, and it should. This is how ghc did it from the start. The State in
> | Haskell papers didn't consider overloading, so we didn't make this explicit. I
> | mentioned it to Mark Jones two years ago, and I thought he had fixed it.
>
> It can't have the stated type because that type doesn't make sense; at
> this point in time, there is no way to abstract over a context. The
> most general type for runST is:
>
> runST :: (forall s. ST s a) -> a
>
> And, as Alastair pointed out, this is exactly what Hugs 1.3c uses.
>
> All the best,
> Mark