viewtypedef foo ( l : addr ) = @{ p = int @ l | v = ptr l }
fn bar { l : addr } ( f : &foo l ) : void = let
prval foo_p = f.p
prval () = f.p := foo_p
in () end
the compiler complains that “prval () = f.p := foo_p” may incur a wrt
effect (it allows me to write the line with val instead of prval though).
How can assigning to a view incur a wrt?
to suppress the effect tracking.On Mon, Nov 30, 2015 at 8:34 PM, Shea Levy sh...@shealevy.com wrote:
Hi all,
With this code:
viewtypedef foo ( l : addr ) = @{ p = int @ l | v = ptr l }
fn bar { l : addr } ( f : &foo l ) : void = let
prval foo_p = f.p
prval () = f.p := foo_p
in () end
the compiler complains that “prval () = f.p := foo_p” may incur a wrt
effect (it allows me to write the line with val instead of prval though).
How can assigning to a view incur a wrt?