filepath icon indicating copy to clipboard operation
filepath copied to clipboard

interaction of OsPath with getEnv, GetOpt, optparse-applicative

Open amigalemming opened this issue 1 year ago • 2 comments

Can you please clarify, how to transfer FilePaths from getEnv, GetOpt, optparse-applicative without the roundtrip via String?

amigalemming avatar Jan 22 '24 11:01 amigalemming

All those things need to be reimplemented: https://github.com/pcapriotti/optparse-applicative/issues/65#issuecomment-1742135907

hasufell avatar Jan 22 '24 11:01 hasufell

For getEnv we need:

  • https://hackage.haskell.org/package/unix-2.8.5.0/docs/System-Posix-Env.html#v:getEnv
  • https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getenvironmentvariable

But the latter doesn't exist in Win32 yet... so it has to be added there (probably along with GetEnvironmentStrings)

hasufell avatar Jan 22 '24 15:01 hasufell