aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime
diff options
context:
space:
mode:
authorLuke Lau <luke_lau@icloud.com>2019-11-27 14:32:44 +0000
committerDaniel Gröber (dxld) <dxld@darkboxed.org>2019-11-27 15:39:48 +0100
commitc20981c0cf56d0a9d9fbfba9be961dbb4d5896c9 (patch)
tree657d23878e1b9bb06fe4ededa253cf223b15e8b9 /src/CabalHelper/Compiletime
parente22da060d78f1d3c43ea09680873b1940e81e3ea (diff)
Explicitly state package in component
This fixes scenarios such as: cabal: Ambiguous target 'test:foo'. It could be: A:test:foo (component) B:test:foo (component)
Diffstat (limited to 'src/CabalHelper/Compiletime')
-rw-r--r--src/CabalHelper/Compiletime/Program/CabalInstall.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CabalHelper/Compiletime/Program/CabalInstall.hs b/src/CabalHelper/Compiletime/Program/CabalInstall.hs
index ac7dfa6..58e21be 100644
--- a/src/CabalHelper/Compiletime/Program/CabalInstall.hs
+++ b/src/CabalHelper/Compiletime/Program/CabalInstall.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DataKinds, MultiWayIf, TupleSections, GADTs #-}
+{-# LANGUAGE DataKinds, MultiWayIf, TupleSections, GADTs, OverloadedStrings #-}
-- cabal-helper: Simple interface to Cabal's configuration state
-- Copyright (C) 2018 Daniel Gröber <cabal-helper@dxld.at>
@@ -301,7 +301,7 @@ planPackages plan = do
unitTargets :: CP.Unit -> [String]
unitTargets CP.Unit {uComps, uPId=CP.PkgId pkg_name _} =
- map (Text.unpack . CP.dispCompNameTarget pkg_name) $
+ map (Text.unpack . (((coerce pkg_name) <> ":") <>) . CP.dispCompNameTarget pkg_name) $
Map.keys uComps
mkUnit :: Package' () -> CP.Unit -> Unit ('Cabal 'CV2)