Commit 3a5f6ae7 authored by Bertram Felgenhauer's avatar Bertram Felgenhauer Committed by Mikhail Glushenkov
Browse files

Add -none syntax for version ranges.

The motivation is to be able to say --constraint 'foo -none' to prevent
'foo' from being considered when installing packages. See #2092.
parent ce473997
...@@ -722,9 +722,11 @@ instance Text VersionRange where ...@@ -722,9 +722,11 @@ instance Text VersionRange where
return f) return f)
factor = Parse.choice $ parens expr factor = Parse.choice $ parens expr
: parseAnyVersion : parseAnyVersion
: parseNoVersion
: parseWildcardRange : parseWildcardRange
: map parseRangeOp rangeOps : map parseRangeOp rangeOps
parseAnyVersion = Parse.string "-any" >> return AnyVersion parseAnyVersion = Parse.string "-any" >> return AnyVersion
parseNoVersion = Parse.string "-none" >> return noVersion
parseWildcardRange = do parseWildcardRange = do
_ <- Parse.string "==" _ <- Parse.string "=="
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment