title: Inplace array modification in Haskell?
body: <p>We all know that modifying a member of a list in a functional style is pretty slow (O(n) for vector, O(log n) for trees), so is there an optimization in the ghc compiler which optimizes this operation to in-place modification? If so, what circumstances does it need? Does it work if the modification happens in a function, and the list you want to modify is one of its arguments?</p>