File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Cabal-syntax/src/Distribution/Types Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -64,13 +64,13 @@ instance Pretty PackageIdentifier where
6464-- Nothing
6565instance Parsec PackageIdentifier where
6666 parsec = do
67- -- comp <- parsec <* P.char '-'
67+ comp <- parsec <* P. char ' -'
6868 xs' <- P. sepByNonEmpty component (P. char ' -' )
6969 (v, xs) <- case simpleParsec (NE. last xs') of
7070 Nothing -> return (nullVersion, toList xs') -- all components are version
7171 Just v -> return (v, NE. init xs')
7272 if not (null xs) && all (\ c -> all (/= ' .' ) c && not (all isDigit c)) xs
73- then return $ PackageIdentifier (mkPackageName (intercalate " -" xs)) v Nothing
73+ then return $ PackageIdentifier (mkPackageName (intercalate " -" xs)) v comp
7474 else fail " all digits or a dot in a portion of package name"
7575 where
7676 component = P. munch1 (\ c -> isAlphaNum c || c == ' .' )
You can’t perform that action at this time.
0 commit comments