Reduce duplicate implementations of argument handling on Windows
On windows we currently ignore arguments to hs_init/main's argv and instead get the arguments from the windows api when they are requested from the Haskell side.
This means
- Passing custom arguments to hs_init when not using hs_main might behave unexpected (The haskell und RTS side see different arguments).
- Duplication of code to simulate filtering of Arguments by the RTS on the Haskell side.
- Behavior between Linux and Windows might differ as result of the above (eg #13287 (closed))
Instead we can get the UTF16 encoded arguments inside of hs_main from the windows API and pass them along to the RTS UTF8-encoded. This allows argument handling to be fairly uniform between Linux and Windows and enables us to accept hs_init arguments on Windows.
Trac metadata
Trac field | Value |
---|---|
Version | |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Runtime System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |