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 <ezyang@cs.stanford.edu>
parent d119a02c
......@@ -220,7 +220,7 @@ fromList pkgs = mkPackageIndex pids pnames
Map.fromList
[ (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 =
Map.fromList
......
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