Clarify the decision behind the HWND/HANDLE/Ptr() type synonyms
- Dominant language
- Haskell
- Stars
- 101
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
I was surprised to find that these aren't the definitions for `HWND` and `HANDLE`
`newtype HWND = HWND { unsafeHWNDToHANDLE :: HANDLE }`
`newtype HANDLE = HANDLE { unsafeHANDLEToPtr :: Ptr () }`
I'm not an expert in Win32 programming, but I don't think that conversions between these three types are so pervasive (and without consequence) as to necessitate using synonyms here rather than something which protects the programmer a little more. If this is required, it would be great to document the declarations with this information, if not then perhaps there could be a major version update replacing the synonyms.
The same thing could probably be said for any of the other type synonyms of `HANDLE` in `Win32`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Begin with the HWND, HANDLE, and other HANDLE-related type-synonym declarations in Win32, then review how their conversions are used. Done means documenting the rationale for keeping the synonyms, or reaching a project decision about replacing them with newtypes in a major version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- operating-systems
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100