Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the decision behind the HWND/HANDLE/Ptr() type synonyms #44

Open
expipiplus1 opened this issue Apr 15, 2016 · 0 comments
Open

Comments

@expipiplus1
Copy link

expipiplus1 commented Apr 15, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants