Skip to content
Snippets Groups Projects
Commit 73bde5b1 authored by Simon Marlow's avatar Simon Marlow Committed by pcapriotti
Browse files

-package P was loading all versions of P in GHCi (#7030)

-package P means "the latest version of P" if multiple versions are
installed.  It was working as advertised, but we were
eagerly *linking* all versions of P, which might cause an error if the
package has some C code, because we can't link multiple instances of
the same symbol.

MERGED from commit 62164cf5
parent e1e68550
No related branches found
No related tags found
No related merge requests found
......@@ -776,7 +776,9 @@ mkPackageState dflags pkgs0 preload0 this_package = do
--
let preload1 = [ installedPackageId p | f <- flags, p <- get_exposed f ]
get_exposed (ExposePackage s) = filter (matchingStr s) pkgs2
get_exposed (ExposePackage s)
= take 1 $ sortByVersion (filter (matchingStr s) pkgs2)
-- -package P means "the latest version of P" (#7030)
get_exposed (ExposePackageId s) = filter (matchingId s) pkgs2
get_exposed _ = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment