Open edwinb opened 4 years ago
Comment by edwinb Friday Mar 27, 2020 at 20:51 GMT
The strange behaviour is probably because in TestStruct
, ExtraStruct
isn't a pointer. A Struct
on the Idris side needs to be a pointer to the struct on the C side. However, there's no way of checking this when generating the Chez Scheme.
Hi, I'm experiencing the same issue modeling a similar pattern.
What's the canonical way of dealing with nested structs? Is there any way to indicate in the Struct
fields that the given field must be treated as value instead of a pointer?
Issue by vfrinken Tuesday Mar 24, 2020 at 04:39 GMT Originally opened as https://github.com/edwinb/Idris2-boot/issues/238
If I have 2 structs in C
and corresponding types in idris
I'm not able to read the correct values from an instance of
TestStruct
using a show function like thisSteps to Reproduce
And example is here https://github.com/vfrinken/nestedStructsIdris2.git
Expected Behavior
x: 1234567890, y: -1
Observed Behavior
x: 0, y: 1234567890