Skip to content

Qualified constraints (issue #3502) part 2 #4228

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
4 commits merged into from Jan 13, 2017
Merged

Qualified constraints (issue #3502) part 2 #4228

4 commits merged into from Jan 13, 2017

Conversation

ghost
Copy link

@ghost ghost commented Jan 12, 2017

This is some further refactoring to address issues discussed in PR #4219

Robert Henderson added 4 commits January 12, 2017 12:25
I also removed 'unqualified' from PackagePath.hs and replaced all
uses of it with 'scopeToplevel'. The meaning is identical,
however 'scopeToplevel' is a less confusing name.
Prefixed all constructors of Qualifier with 'Qual' to make it
easier to grep them.

Renamed 'Unqualified' to 'Toplevel'.
@ghost ghost mentioned this pull request Jan 12, 2017
@23Skidoo
Copy link
Member

/cc @grayjay

Copy link
Collaborator

@grayjay grayjay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, modulo one comment.

@@ -150,7 +150,7 @@ projectFreezeConstraints plan =
versionConstraints :: Map PackageName [(UserConstraint, ConstraintSource)]
versionConstraints =
Map.mapWithKey
(\p v -> [(UserConstraint UserUnqualified p (PackagePropertyVersion v),
(\p v -> [(UserConstraint UserToplevel p (PackagePropertyVersion v),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a lot clearer. Thanks for renaming the constructors.

++ "either a version range, 'installed', 'source' or flags"
"expected a (possibly qualified) package name followed by a " ++
"constraint, which is either a version range, 'installed', " ++
"'source', 'test', 'bench', or flags"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@@ -361,7 +361,7 @@ dontUpgradeNonUpgradeablePackages params =
where
extraConstraints =
[ LabeledPackageConstraint
(PackageConstraint (unqualified pkgname) PackagePropertyInstalled)
(PackageConstraint (scopeToplevel pkgname) PackagePropertyInstalled)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The non-upgradable package constraints can use ScopeAnyQualifier now.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

@ghost ghost merged commit b32cfbc into haskell:master Jan 13, 2017
@ghost ghost deleted the issue-3502-part3 branch January 13, 2017 11:27
This pull request was closed.
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.

2 participants