Skip to content

Commit 4fa3b47

Browse files
committed
Add explanation of package name parsing commercialhaskell#1873
1 parent ca685c7 commit 4fa3b47

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Stack/Types/PackageName.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,8 @@ packageNameArgument =
164164
p s =
165165
case parsePackageNameFromString s of
166166
Just x -> Right x
167-
Nothing -> Left ("Expected valid package name, but got: " ++ s)
167+
Nothing -> Left $ unlines
168+
[ "Expected valid package name, but got: " ++ s
169+
, "Package names consist of one or more alphanumeric words separated by hyphens."
170+
, "To avoid ambiguity with version numbers, each of these words must contain at least one letter."
171+
]

0 commit comments

Comments
 (0)