Hi Jon,
Sorry about the problems with thenST/returnST.
I've replaced references with >>= and return as you suggest and before
the next big release, I'll make sure that all demos and libraries at
least load without complaint.
The problems with runST all stem from the fact that runST looks like a
function but it's really a keyword with a special typing rule.
(Details in the Launchbury-SLPJ paper about runST.)
Some consequences of this are:
1) You can't write "runST" on its own - it always has to be applied
to an argument (an "atomic expression").
2) If you try to "repackage" runST like this:
myRunST foo = runST foo
then myRunST doesn't inherit the special typing rule.
I suspect that HBC uses a similar implementation - giving similar behaviour.
GHC doesn't have either problem because they made runST a normal value
with a somewhat magical type. Their typechecker is able to propagate
these types so you can repackage runST as above. In fact, ghc-2.04
even lets you write a type signature for myRunST (if you turn on
-fglasgow-exts).
That said, the problems you're experiencing with runST are caused by a
bug in the typechecker which we introduced while fixing another bug.
Needless to say, we're working on a fix. (Or maybe we should just
back out the bug "fix".)
Alastair
ps You ask:
> PS. Who is not on the hugs bugs list
A quick check of the lists reveals that hugs-bugs has 69 names and
hugs-users has just 8 names (I haven't checked whether they overlap).
This is the opposite of how it's supposed to be:
1) People on hugs-bugs really ought to be subscribed to hugs-users too.
2) It'd be nice to think there's more users than bugs :-)
But, whatever... As long as the messages on the lists more or less
match the descriptions, I guess everyone's happy.