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

getNameInfo: how are Bool arguments and Maybe results related? #496

Open
amigalemming opened this issue Mar 18, 2021 · 3 comments
Open

getNameInfo: how are Bool arguments and Maybe results related? #496

amigalemming opened this issue Mar 18, 2021 · 3 comments

Comments

@amigalemming
Copy link

amigalemming commented Mar 18, 2021

I do not understand the warranties, getNameInfo makes about its results.
If an argument is False, does this mean that the corresponding result is always Nothing?
Likewise, if an argument is True, does this mean that the corresponding result is always Just?

Related to #416.

@kazu-yamamoto
Copy link
Collaborator

I'm not the original author. But the code says that your two assumptions are yes.

@amigalemming
Copy link
Author

amigalemming commented Jan 18, 2022 via email

@kazu-yamamoto
Copy link
Collaborator

I agree with you. We should define variants, for instance, getAddrInformation and getNameInformation which are clean for error codes.

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

No branches or pull requests

2 participants