I've been Backpack'ifying unix on the suggestion of @hvr, and I have realized that the String and ByteString implementations have desynchronized in a few cases. I'm still working my way through the modules but here are the ones I've noticed:
System.Posix.Env
- ByteString does not implement/export setEnvironment
- ByteString:
unsetEnv name = putEnv (name ++ "=") Pretty sure this is a type error
- ByteString:
putEnv uses useAsCString to allocate the string passed to putenv, but String has a comment indicating we must not free the string after putenv according to SUSv2
Actually, amazingly enough, I checked the rest of the implementations and this was the only desynchronization.