So making the primitives return ByteArray instances instead of ByteString should be safe enough :).
But this is in my opinion clearly a hack instead of fixing the real problem, and we have to be careful to guard such patterns with comments everywhere explaining why the bytearray conversion is really needed there���

Guillermo what is the correct way to do it?

Would it be helpful to have getenv primitives that answer ByteArray
instead, and to let all conversion (including in OSProcess) be done in
the image?

Well, personally I would like that getenv/setenv and getcwd setcwd support are not in a plugin but as a basic service provided by the vm.

Cheers,
Guille
 

Thanks,
Dave




--
   
Guille Polito
Research Engineer


Centre de Recherche en Informatique, Signal et Automatique de Lille
CRIStAL - UMR 9189
French National Center for Scientific Research - http://www.cnrs.fr

Phone: +33 06 52 70 66 13