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

Don't conditionally define datatypes etc #40

Closed
igfoo opened this issue Jul 6, 2012 · 4 comments
Closed

Don't conditionally define datatypes etc #40

igfoo opened this issue Jul 6, 2012 · 4 comments
Assignees

Comments

@igfoo
Copy link
Contributor

igfoo commented Jul 6, 2012

The network package conditionally defines things depending on the capabilities of the platform, e.g.:

data Family
    =
[...]
#ifdef AF_INET6
    | AF_INET6            -- Internet Protocol version 6
#endif
[...]

This makes it impossible to write portable programs. Please instead define the datatypes etc unconditionally, and change the code so that, for example, it throws an exception if an unsupported family is used, and perhaps also provide functions like

supportedFamily :: Family -> Bool
@tibbe
Copy link
Member

tibbe commented Jul 10, 2012

I'm in favor of this.

@bmillwood
Copy link
Contributor

Despite the above pull request, I think there's more to be done. There are still a few functions, especially IPv6 stuff, that are only conditionally exported.

@tibbe
Copy link
Member

tibbe commented Sep 26, 2012

@BenMachine Agreed. We just need to sort out exactly what to do.

@kazu-yamamoto
Copy link
Collaborator

Already implemneted.

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

4 participants