haskell / win32

Haskell support for the Win32 API
http://hackage.haskell.org/package/Win32
Other
98 stars 62 forks source link

Implement getEnv and getEnvironment #232

Closed hasufell closed 1 month ago

hasufell commented 3 months ago

See https://github.com/haskell/filepath/issues/221

base/ghc implementations: https://hackage.haskell.org/package/ghc-internal-9.1001.0/docs/src//GHC.Internal.System.Environment.html

Base runs two calls to c_GetEnvironmentVariable to get a more accurate allocation. But it's an additional call.

hasufell commented 1 month ago

@Mistuke this is ready for review

hasufell commented 1 month ago

It's possible this needs some adjustment to work across different GHCs (as in filepath/os-string versions).

hasufell commented 1 month ago

It's possible this needs some adjustment to work across different GHCs (as in filepath/os-string versions).

Should be fixed

Mistuke commented 1 month ago

@Mistuke this is ready for review

Sorry was on holidays!

hasufell commented 1 month ago

Anything left to do here?