Skip to content

Avoid sets of simples #386

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

Merged
merged 11 commits into from
May 7, 2021
Merged

Avoid sets of simples #386

merged 11 commits into from
May 7, 2021

Conversation

lukemaurer
Copy link

@lukemaurer lukemaurer commented Apr 1, 2021

A Name.Set.t or 'a Name.Map.t is a fine thing, but a Simple.Set.t
or 'a Simple.Map.t is much sketchier, since whether we want to treat
two simples that differ only in Rec_info.t as equivalent depends on
context. Fortunately, we usually just need a set or map of names. The
one place where this gets tricky is in the uses of Aliases.get_alias,
so there's now Aliases.Alias_set.t to encapsulate the needed
operations.

@mshinwell mshinwell requested a review from poechsel April 1, 2021 11:34
@mshinwell
Copy link

Could we enhance this to actually remove Simple.Set entirely? I think there might not be much more to do. Is it feasible to do the same for Simple.Map? I think the main user is Aliases.

@lukemaurer lukemaurer force-pushed the avoid-sets-of-simples branch from feb94a6 to d832a12 Compare April 7, 2021 13:19
@lukemaurer lukemaurer force-pushed the avoid-sets-of-simples branch from bd4dad1 to 27cce55 Compare April 21, 2021 18:10
@lukemaurer
Copy link
Author

Anyone know why the tests aren't running for this? @mshinwell? Should be ready for final review and merge otherwise

@mshinwell
Copy link

@lukemaurer I think it's because you need to rebase, there is a conflict

A `Name.Set.t` or `'a Name.Map.t` is a fine thing, but a `Simple.Set.t`
or `'a Simple.Map.t` is much sketchier, since whether we want to treat
two simples that differ only in `Rec_info.t` as equivalent depends on
context. Fortunately, we usually just need a set or map of names. The
one place where this gets tricky is in the uses of `Aliases.get_alias`,
so there's now `Aliases.Alias_set.t` to encapsulate the needed
operations.
Everything is now gone except for a few stragglers in `cmx/` and
`naming/`; these will be more easily dealt with after some changes to
`Simple.t`.
@lukemaurer lukemaurer force-pushed the avoid-sets-of-simples branch from 27cce55 to 7f1dec6 Compare April 23, 2021 11:15
@lukemaurer
Copy link
Author

@lukemaurer I think it's because you need to rebase, there is a conflict

Rebased (freaking .depend ...), but it still says “Workflow runs completed with no jobs.”

lukemaurer added a commit that referenced this pull request Apr 30, 2021
This reverts the parts of commit
9816841 that have been split off into
PRs #383 and #386, as well as the Bottom stuff (likely to be unnecessary
as we're considering making `Coercion.compose` a total function).
lukemaurer added 2 commits May 4, 2021 17:14
Actually making the change (which would require significantly
refactoring `Typing_env.add_equation`) is outside the scope of this
PR.
@poechsel
Copy link

poechsel commented May 7, 2021

I agree to merge if the add_result type for [add_alias] is added in a subsequent PR.

@lukemaurer lukemaurer merged commit 7a0d56d into flambda2.0-stable May 7, 2021
@lukemaurer lukemaurer deleted the avoid-sets-of-simples branch May 7, 2021 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants