runSTArray for multiple arrays

Henning Thielemann lemming at henning-thielemann.de
Wed Mar 12 03:01:54 EDT 2008


Currently, runSTArray can handle only one array:

runSTArray :: Ix i => (forall s . ST s (STArray s i e)) -> Array i e


Would it be possible to access multiple arrays successively by a function 
like

runSTArraySplit :: Ix i =>
    (forall s . ST s (STArray s i e, a)) ->
    (Array i e, ST t a)

Hm, this would not work, because type variables 's' in 'a' had to be 
converted to 't' as well. Are there other ideas to tackle this problem?


More information about the Libraries mailing list