@@ -1728,7 +1728,6 @@ elaborateInstallPlan
17281728 { elabModuleShape = emptyModuleShape
17291729 , elabUnitId = notImpl " elabUnitId"
17301730 , elabComponentId = notImpl " elabComponentId"
1731- , elabLinkedInstantiatedWith = Map. empty
17321731 , elabInstallDirs = notImpl " elabInstallDirs"
17331732 , elabPkgOrComp = ElabComponent (ElaboratedComponent {.. })
17341733 }
@@ -1747,14 +1746,11 @@ elaborateInstallPlan
17471746 compOrderLibDependencies = notImpl " compOrderLibDependencies"
17481747
17491748 -- Not supported:
1750- compExeDependencies :: [a ]
17511749 compExeDependencies = []
1752-
1753- compExeDependencyPaths :: [a ]
17541750 compExeDependencyPaths = []
1755-
1756- compPkgConfigDependencies :: [ a ]
1757- compPkgConfigDependencies = []
1751+ compPkgConfigDependencies = []
1752+ compInstantiatedWith = mempty
1753+ compLinkedInstantiatedWith = Map. empty
17581754
17591755 notImpl f =
17601756 error $
@@ -1812,6 +1808,8 @@ elaborateInstallPlan
18121808 , Just paths <- [Map. lookup (ann_id aid') exe_map1]
18131809 , path <- paths
18141810 ]
1811+ compInstantiatedWith = Map. empty
1812+ compLinkedInstantiatedWith = Map. empty
18151813 elab_comp = ElaboratedComponent {.. }
18161814
18171815 -- 3. Construct a preliminary ElaboratedConfiguredPackage,
@@ -1867,7 +1865,6 @@ elaborateInstallPlan
18671865 { elabModuleShape = lc_shape lc
18681866 , elabUnitId = abstractUnitId (lc_uid lc)
18691867 , elabComponentId = lc_cid lc
1870- , elabLinkedInstantiatedWith = Map. fromList (lc_insts lc)
18711868 , elabPkgOrComp =
18721869 ElabComponent $
18731870 elab_comp
@@ -1878,6 +1875,7 @@ elaborateInstallPlan
18781875 (abstractUnitId . ci_id)
18791876 (lc_includes lc ++ lc_sig_includes lc)
18801877 )
1878+ , compLinkedInstantiatedWith = Map. fromList (lc_insts lc)
18811879 }
18821880 }
18831881 elab =
@@ -2031,7 +2029,6 @@ elaborateInstallPlan
20312029 elab0
20322030 { elabUnitId = newSimpleUnitId pkgInstalledId
20332031 , elabComponentId = pkgInstalledId
2034- , elabLinkedInstantiatedWith = Map. empty
20352032 , elabPkgOrComp = ElabPackage $ ElaboratedPackage {.. }
20362033 , elabModuleShape = modShape
20372034 }
@@ -2128,8 +2125,6 @@ elaborateInstallPlan
21282125 -- These get filled in later
21292126 elabUnitId = error " elaborateSolverToCommon: elabUnitId"
21302127 elabComponentId = error " elaborateSolverToCommon: elabComponentId"
2131- elabInstantiatedWith = Map. empty
2132- elabLinkedInstantiatedWith = error " elaborateSolverToCommon: elabLinkedInstantiatedWith"
21332128 elabPkgOrComp = error " elaborateSolverToCommon: elabPkgOrComp"
21342129 elabInstallDirs = error " elaborateSolverToCommon: elabInstallDirs"
21352130 elabModuleShape = error " elaborateSolverToCommon: elabModuleShape"
@@ -2733,7 +2728,6 @@ instantiateInstallPlan storeDirLayout defaultInstallDirs elaboratedShared plan =
27332728 elab0
27342729 { elabUnitId = uid
27352730 , elabComponentId = cid
2736- , elabInstantiatedWith = fmap fst insts
27372731 , elabIsCanonical = Map. null (fmap fst insts)
27382732 , elabPkgOrComp =
27392733 ElabComponent
@@ -2745,6 +2739,7 @@ instantiateInstallPlan storeDirLayout defaultInstallDirs elaboratedShared plan =
27452739 unDefUnitId
27462740 (deps ++ concatMap (getDep . fst ) (Map. elems insts))
27472741 )
2742+ , compInstantiatedWith = fmap fst insts
27482743 }
27492744 }
27502745 elab =
@@ -2856,8 +2851,8 @@ instantiateInstallPlan storeDirLayout defaultInstallDirs elaboratedShared plan =
28562851
28572852 work = for_ pkgs $ \ pkg ->
28582853 case pkg of
2859- InstallPlan. Configured elab
2860- | not (Map. null (elabLinkedInstantiatedWith elab )) ->
2854+ InstallPlan. Configured ( elab@ ElaboratedConfiguredPackage {elabPkgOrComp = ElabComponent comp})
2855+ | not (Map. null (compLinkedInstantiatedWith comp )) ->
28612856 indefiniteUnitId (elabComponentId elab)
28622857 >> return ()
28632858 _ ->
@@ -3939,7 +3934,9 @@ setupHsConfigureFlags
39393934 configProfExe = mempty
39403935 configProf = toFlag $ LBC. withProfExe elabBuildOptions
39413936
3942- configInstantiateWith = Map. toList elabInstantiatedWith
3937+ configInstantiateWith = case elabPkgOrComp of
3938+ ElabPackage _ -> mempty
3939+ ElabComponent comp -> Map. toList (compInstantiatedWith comp)
39433940
39443941 configDeterministic = mempty -- doesn't matter, configIPID/configCID overridese
39453942 configIPID = case elabPkgOrComp of
0 commit comments