Commit fa10118a authored by Edward Z. Yang's avatar Edward Z. Yang

Properly handle mkPackageIndex.

The order of the tupling matters, because version needs to be
sorted lexicographically last in order to make the groupBy
work.  The old code was obviously wrong.
Signed-off-by: default avatarEdward Z. Yang <>
parent d119a02c
......@@ -220,7 +220,7 @@ fromList pkgs = mkPackageIndex pids pnames
[ (liftM2 (,) packageName IPI.sourceLibName (head pkgsN), pvers)
| pkgsN <- groupBy (equating (liftM2 (,) packageName IPI.sourceLibName))
. sortBy (comparing (liftM2 (,) packageId IPI.sourceLibName))
. sortBy (comparing (liftM3 (,,) packageName IPI.sourceLibName packageVersion))
$ pkgs
, let pvers =
Markdown is supported
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