
2 Oct
2006
2 Oct
'06
2:50 p.m.
| > | t1 = runST (trav f [1..10] (1,52) >>= \ (s::STRef s (Set Int)) -> seen | > s) | > | > try | > | > t1 = runST ( (trav f [1..10] (1,52) >>= \ s -> seen s) | > :: forall s. ST s [Int] ) | | No, the problem is that t1 should use another implementation than t2. | This version cannot discriminate between different implementations | anymore. (And logically it did not compile.) Oh I see. Well, you'd need to put the type annotation for s back in: t1 = runST ( (trav f [1..10] (1,52) >>= \ (s::STRef s (Set Int)) -> seen s) :: forall s. ST s [Int] ) Simon