Loader: `partOfGHCi` isn't up-to-date
partOfGHCi
is defined in GHC.Linker.Loader
as:
-- If this package is already part of the GHCi binary, we'll already
-- have the right DLLs for this package loaded, so don't try to
-- load them again.
--
-- But on Win32 we must load them 'again'; doing so is a harmless no-op
-- as far as the loader is concerned, but it does initialise the list
-- of DLL handles that rts/Linker.c maintains, and that in turn is
-- used by lookupSymbol. So we must call addDLL for each library
-- just to get the DLL handle into the list.
partOfGHCi :: [PackageName]
partOfGHCi
| isWindowsHost || isDarwinHost = []
| otherwise = map (PackageName . mkFastString)
["base", "template-haskell", "editline"]
This list isn't up to date. E.g. editline
has been replaced by haskeline
12 years ago (46aed8a4).
A more robust solution could be to query the UnitState to get the dependencies of the ghci
unit instead of hardwiring them here.