Closed alt-romes closed 2 years ago
After https://github.com/alt-romes/hegg/issues/3#issuecomment-1229417534 I rescind on my previous remark and agree that #3 should be closed by this issue.
Great.
The benefit of only-exposing-some-lenses approach is that not everything is leaked (i.e. the work list) and we indeed keep the flexibility to alter the structure in analysis. It's also in a separate module so the user who doesn't need additional capabilities won't see them in the e-graph module.
As for other-modules
: I see your point, we can export it without documentation, meaning someone who do needs it can import it and read the documentation inline.
I'll patch the other-modules thing and merge
We can later revise this decision of abstraction, but for now this is a nice clean up that doesn't sacrifice anything
Thanks!
Closes #3
As described in the comment https://github.com/alt-romes/hegg/issues/3#issuecomment-1229048536, the solution to providing the abstract definition of e-graphs while still allowing other library modules and analysis implementations to modify the structure of the e-graph (e.g. the nodes in a class) is to have
Data.Equality.Graph.Lenses
as the one true way to do so.CC @aspiwack