Unfortunately, this cannot be done.
The only way I can see to make it safe is this:
absvtype myenv = void
// implement the following two proof functions
prfun myenv_decode (&myenv >> void): @[int][N]@A
prfun myenv_encode (&void >> myenv, @[int][N]@A): void
implement
loop$fwork<myenv> (env) = ... // using decode and encode
...loop<myenv>()...