I wonder if this source file would be of interest, from Sergey Mironov's
urweb-monad-pack library.
https://github.com/grwlf/urweb-monad-pack/blob/master/state.ur
I'm not familiar enough with Haskell myself to know whether it's a
perfect match.
On 12/23/2015 11:16 AM, Artella Coding wrote:
Hi, is there something like a haskell runST monad
(https://wiki.haskell.org/Monad/ST) in ur/web, so that I can perform
mutations within a pure function?
For example I might want to have my pure function make a copy of a
large array, and then perform the relevant mutations on this copy,
before returning this copy. The function is pure in that it does not
modify the input nor does it require data from the "outside world",
and yet relies on mutations of the internal copy (which it employs for
the sake of efficiency).
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur