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

Static type-checking of required fields. #42

Open
judah opened this issue Sep 5, 2016 · 0 comments
Open

Static type-checking of required fields. #42

judah opened this issue Sep 5, 2016 · 0 comments

Comments

@judah
Copy link
Collaborator

judah commented Sep 5, 2016

Currently, required fields are defaulted to the "zero" value for that type. We should instead provide smart construction that checks at compile time whether all the required fields have been set properly.

Note that this is moot for proto3, which got rid of the concept of required fields altogether.

One possible, nebulously-described approach: for every datatype Foo, also define a Foo'Builder which is parametrized by the type of each required field (and which may be () if it's not set). This Foo'Builder can be an instance of Default (instead ofFoo), and we can provide lenses to build up its individual fields, as well as a class to "freeze" Foo'Builder into Foo once all its fields have been set.

blackgnezdo pushed a commit that referenced this issue Aug 17, 2018
I'm not sure why, but in some cases it seems linking only works if *both* the
.so and the .dylib are present in /usr/local/lib.  This may be due to a quirk
of how Bazel builds the library, and/or how ghc/stack load the library.
blackgnezdo pushed a commit that referenced this issue Aug 17, 2018
…44)

The right approach is to run `install_name_tool` on the library after renaming
its extension from ".so" to ".dylib".
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

1 participant