From: Thomas Schilling Date: Fri, 21 Aug 2009 23:53:55 +0000 (+0000) Subject: Make updates to external package state idempotent. X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=4201e0f80cf3b47093b60c47d7bf733f17912d81;p=ghc-hetmet.git Make updates to external package state idempotent. Without this, concurrent updates to the EPS could introduce overlapping instances (even though they came from the same module). --- diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs index 3a4cfe5..cedc447 100644 --- a/compiler/iface/LoadIface.lhs +++ b/compiler/iface/LoadIface.lhs @@ -257,6 +257,7 @@ loadInterface doc_str mod from } ; updateEps_ $ \ eps -> + if elemModuleEnv mod (eps_PIT eps) then eps else eps { eps_PIT = extendModuleEnv (eps_PIT eps) mod final_iface, eps_PTE = addDeclsToPTE (eps_PTE eps) new_eps_decls,