Skip to content

String and ByteString implementations have desynchronized #68

@ezyang

Description

@ezyang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions