Skip to content

Qualified constraints (issue #3502) part 2 - #4228

Merged
4 commits merged into
masterfrom
unknown repository
Jan 13, 2017
Merged

4 commits merged into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jan 12, 2017

Copy link
Copy Markdown

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
Copy Markdown
Member

/cc @GrayJay

@sebright sebright left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, modulo one comment.

versionConstraints =
Map.mapWithKey
(\p v -> [(UserConstraint UserUnqualified p (PackagePropertyVersion v),
(\p v -> [(UserConstraint UserToplevel p (PackagePropertyVersion v),

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good catch!

extraConstraints =
[ LabeledPackageConstraint
(PackageConstraint (unqualified pkgname) PackagePropertyInstalled)
(PackageConstraint (scopeToplevel pkgname) PackagePropertyInstalled)

Copy link
Copy Markdown
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
Copy Markdown
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