Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal On branch : master
http://hackage.haskell.org/trac/ghc/changeset/96abc7dfe6cd06d54715c82e18fcd25fcb16e46c >--------------------------------------------------------------- commit 96abc7dfe6cd06d54715c82e18fcd25fcb16e46c Author: Duncan Coutts <[email protected]> Date: Sat Mar 21 15:46:23 2009 +0000 Improve the parse error message for package name/deps Make it clear that it's the specification of the package name that is at fault rather than the package to which the name refers. >--------------------------------------------------------------- cabal-install/Distribution/Client/Setup.hs | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/cabal-install/Distribution/Client/Setup.hs b/cabal-install/Distribution/Client/Setup.hs index e0dd880..e44e6c6 100644 --- a/cabal-install/Distribution/Client/Setup.hs +++ b/cabal-install/Distribution/Client/Setup.hs @@ -676,7 +676,9 @@ parsePackageArgs = parsePkgArgs [] parsePkgArgs ds (arg:args) = case readPToMaybe parseDependencyOrPackageId arg of Just dep -> parsePkgArgs (dep:ds) args - Nothing -> Left ("Failed to parse package dependency: " ++ show arg) + Nothing -> Left $ + show arg ++ " is not valid syntax for a package name or" + ++ " package dependency." readPToMaybe :: Parse.ReadP a a -> String -> Maybe a readPToMaybe p str = listToMaybe [ r | (r,s) <- Parse.readP_to_S p str _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
