-
Notifications
You must be signed in to change notification settings - Fork 49
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
Improve C++ support #13
Comments
Writing down those ideas would help others pick this up if they want to. |
An idea for template support: Anything with template polymorphism would be generated with an explicit function. This function would get a templated C++ implementation and a Haskell typeclass. You could then request specializations of this function for given Haskell types, which would produce typeclass instances. Sketch:
|
Actually you could just use a regular block instead of a function, and you could share classes:
produces:
|
Yes, that makes a lot of sense, thanks a lot for the input. I especially like the second mockup of how it would look like. There is the slight disadvantage of an upfront setup, but I don't think we can do much better than that. I fear that the hardest part of this will be parsing C++ types... |
Some further thoughts: It would be good if external modules could generate implementations of templating classes (eg.
Or perhaps when we produce a templating class, eg.
and then it's |
The main things to do are:
I have some ideas for both, currently experimenting.
The text was updated successfully, but these errors were encountered: