Interesting. Would be used like this:
uniquePermutations xs = runST $ strictToLazyST $ (uniquePermutationsST xs) After also swapping `runST` to the lazy version, it compiles and runs. Thank you! -----Original Message----- From: Peter Gammie [mailto:pete...@gmail.com] Sent: Mittwoch, 22. Juli 2009 01:25 To: Christian Klauser Cc: glasgow-haskell-users@haskell.org Subject: Re: "Could not deduce (MArray (STUArray s) Int (ST s)) from context ()" when applying runST On 22/07/2009, at 9:16 AM, Christian Klauser wrote: > Thank you, works indeed with the strict ST monad. Didn't think of > that. But > makes kind of sense not to define these instances, since unboxed > values > cannot have their computation delayed. It's a bit unfortunate, > however, that > a single use > of an unboxed array "forces" the whole state thread to become strict. Hmm. Have you seen the strictToLazyST function? http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad-ST- Lazy.html#v%3AstrictToLazyST cheers peter _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users