ekzhang / crepe

Datalog compiler embedded in Rust as a procedural macro
Apache License 2.0
453 stars 16 forks source link

Relation/struct named fields #18

Open Z-snails opened 2 years ago

Z-snails commented 2 years ago

Currently relations only support tuple structs, named field structs would be good for documentation purposes. I would certainly think it would be useful to use the input structs in non-crepe code, as it could be clearer than anonymous tuples.

ekzhang commented 2 years ago

Hi, thanks for the suggestion. This is possible but also would require quite a few substantial changes to how the compiled code is generated, in particular the index data structure would need to be updated, and more parsing logic for relations introduced.