-
Notifications
You must be signed in to change notification settings - Fork 52
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
Try making all of the ids type parameters #1371
base: dev
Are you sure you want to change the base?
Conversation
type segment('a) = list(piece('a)) | ||
and piece('a) = | ||
| Tile(tile('a)) | ||
| Grout(Grout.t) | ||
| Secondary(Secondary.t) | ||
| Projector(projector) | ||
and tile = { | ||
| Projector(projector('a)) | ||
and tile('a) = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main idea for tiles.
// invariants: | ||
// - length(mold.in_) + 1 == length(label) | ||
// - length(shards) <= length(label) | ||
// - length(shards) == length(children) + 1 | ||
// - sort(shards) == shards | ||
id: Id.t, | ||
extra: 'a, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this to something more relevant and have the inhabitants use a {id: Id.t}
type rather than directly embed Id.t
src/haz3lcore/statics/TermBase.re
Outdated
| Cast(t, Typ.t, Typ.t) // first Typ.t field is only meaningful in dynamic expressions | ||
and t = IdTagged.t(term); | ||
| Cast(t('id), Typ.t, Typ.t) // first Typ.t field is only meaningful in dynamic expressions | ||
and t('id) = IdTagged.t(term('id), 'id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't feel like the right encoding but I'd like to talk with someone else about it before I fall down any more rabbit holes
- Still need to fix every callsite
This is still just an idea. Not sure if it's a good one.