From c20981c0cf56d0a9d9fbfba9be961dbb4d5896c9 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Wed, 27 Nov 2019 14:32:44 +0000 Subject: 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) --- src/CabalHelper/Compiletime/Program/CabalInstall.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 @@ -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) -- cgit v1.2.3