Closed AmjadHD closed 3 months ago
Futhark tries to emulate C, and in C when you import a module with a typedef'ed struct you get both the original and the typedef'ed version. So this works as intended.
Besides the output of nim doc
suffers greatly if these aren't exported.
These clutter the autocompletion suggestions, bloat the API and pollute the documentation. What I had in mind is an option to generate:
type
Point* = object
x*: cint
y*: cint
and if there is a reference to struct Point
replace it with the alias.
C interoperability is still more important. And detecting struct Point
across the entire output is harder than it sounds.
translates to:
struct_Point
is exported, when arguably it shouldn't be.