Commit 692eb7c3 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Add a comment on the PackageIndex invariant

Record the result of a slightly tricky debugging session so the next
person gets a head start.

[skip ci]
parent a46658e1
......@@ -185,6 +185,11 @@ invariant (PackageIndex pids pnames) =
, let pinstOk = packageName pinst == pname
&& packageVersion pinst == pver
-- If you see this invariant failing (ie the assert in mkPackageIndex below)
-- then one thing to check is if it is happening in fromList. Check if the
-- second list above (the sort [...] bit) is ending up with duplicates. This
-- has been observed in practice once due to a messed up ghc-pkg db. How/why
-- it became messed up was not discovered.
Supports Markdown
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