-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support ADTs #10
Merged
Merged
Support ADTs #10
Commits on Mar 14, 2018
-
Extend contexts to prepare for deriving via TH Rust structs/unions and enums to match ADTs. All old examples still work.
Configuration menu - View commit details
-
Copy full SHA for 8f6ff9f - Browse repository at this point
Copy the full SHA 8f6ff9fView commit details -
Factor out some of the TH stuff
It will need to be reused for deriving Rust types.
Configuration menu - View commit details
-
Copy full SHA for e5fd7d8 - Browse repository at this point
Copy the full SHA e5fd7d8View commit details
Commits on Mar 15, 2018
-
Generate all Rust struct/union/enum's
The Rust codegen that remains is the `impl`s.
Configuration menu - View commit details
-
Copy full SHA for 6e14669 - Browse repository at this point
Copy the full SHA 6e14669View commit details -
Generate (mostly) conversion impl's
Added support for generating the right pairs of `From<...> for ...` impl's for the ADT case. There are still a handful of small TODOs before this is testable though.
Configuration menu - View commit details
-
Copy full SHA for 9931d58 - Browse repository at this point
Copy the full SHA 9931d58View commit details -
All Rust items are correctly generated
I've manually verified that the generated code compiles.
Configuration menu - View commit details
-
Copy full SHA for 122f96e - Browse repository at this point
Copy the full SHA 122f96eView commit details
Commits on Mar 16, 2018
-
The one major hiccup: Haskell's FFI supports a very limited number of types. Consequently, I'm shoving any other type into a pointer (alloca/with) and passing the pointer instead. For complex return values, that means passing in a pointer and assigning to that pointer.
Configuration menu - View commit details
-
Copy full SHA for 64b5007 - Browse repository at this point
Copy the full SHA 64b5007View commit details -
Added a context for unboxed types too.
Configuration menu - View commit details
-
Copy full SHA for ca32893 - Browse repository at this point
Copy the full SHA ca32893View commit details
Commits on Mar 17, 2018
-
Replaced uses of 'Into' with a custom 'MarshalInto'. Obviously this isn't great, but it does mean I can make the struct impl's I want (without conflicting with some more general impl).
Configuration menu - View commit details
-
Copy full SHA for dd4db6c - Browse repository at this point
Copy the full SHA dd4db6cView commit details
Commits on Mar 18, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 484472c - Browse repository at this point
Copy the full SHA 484472cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.