diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-08-07 19:04:12 +0200 |
---|---|---|
committer | Daniel Gröber (dxld) <dxld@darkboxed.org> | 2019-09-17 17:48:26 +0200 |
commit | 9cb1c594fa944bdaba84de69e35118430b5590cf (patch) | |
tree | ec2ef74370ad6640caf9b3afd9d57b8e63acc777 /src/CabalHelper/Compiletime/Program/CabalInstall.hs | |
parent | aad828c48f26ea6febaabf37632b0e45868db895 (diff) |
Break cycle between 'Package' and 'Unit'
Diffstat (limited to 'src/CabalHelper/Compiletime/Program/CabalInstall.hs')
-rw-r--r-- | src/CabalHelper/Compiletime/Program/CabalInstall.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/CabalHelper/Compiletime/Program/CabalInstall.hs b/src/CabalHelper/Compiletime/Program/CabalInstall.hs index cce4364..cc05421 100644 --- a/src/CabalHelper/Compiletime/Program/CabalInstall.hs +++ b/src/CabalHelper/Compiletime/Program/CabalInstall.hs @@ -262,6 +262,7 @@ planPackages plan = do where groupByMap = Map.fromListWith (<>) . map (CP.uPId &&& (:|[])) + mkPackage :: NonEmpty CP.Unit -> IO (Package ('Cabal 'CV2)) mkPackage units@(unit :| _) = case unit of CP.Unit @@ -275,11 +276,12 @@ planPackages plan = do , pSourceDir = pkgdir , pCabalFile = CabalFile cabal_file , pFlags = [] - , pUnits = fmap (mkUnit pkg) units + , pUnits = fmap (mkUnit pkg { pUnits = () }) units } return pkg _ -> panicIO "planPackages.mkPackage: Got non-unpacked package src!" + mkUnit :: Package' () -> CP.Unit -> Unit ('Cabal 'CV2) mkUnit pkg CP.Unit { uDistDir=Just distdirv1 , uComps=comps |