MArray and runST
Thu, 13 Feb 2003 11:45:18 +0000
Ahh, I see, perhaps you could give me a clue as to why (or how) this
I have probably become a little over keen on using '$' as a general
braces '(' ')' - the '$' was there because the actual wrapper function
takes arguments and
it looks neater not to have too many nested braces. I thought this could
be something to do
with runST enforcing strictness, but '$!' causes the same problem, only
runST (wrapper x y z)
appears to work - if its not too much trouble, how does runSTs type
enforce this, and why does
using '$' and '$!' cause type leakage?
Simon Marlow wrote:
>>However the problem comes when I try and use runST to run it...
>>runMatrix :: Array (Int,Int) Int
>>runMatrix = runST $ wrapper
>>This is becase 's' escapes
>>Expected: ST s a -> b
>>Inferred: (forall s1. ST s1 a) -> a
>Delete the dollar?
>Glasgow-haskell-users mailing list