From ec06b04d0017917fa1e5ae64f24e7a447d005a1b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Mar 2020 20:30:54 +0200 Subject: [PATCH] Prepend hs-source-dir to match-component #6622 --- cabal-install/Distribution/Client/TargetSelector.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cabal-install/Distribution/Client/TargetSelector.hs b/cabal-install/Distribution/Client/TargetSelector.hs index 23d92f580fd..407a98e51a7 100644 --- a/cabal-install/Distribution/Client/TargetSelector.hs +++ b/cabal-install/Distribution/Client/TargetSelector.hs @@ -2117,11 +2117,12 @@ matchComponentOtherFile :: [KnownComponent] -> String -> Match (FilePath, KnownComponent) matchComponentOtherFile cs = matchFile - [ (file, c) - | c <- cs - , file <- cinfoHsFiles c - ++ cinfoCFiles c - ++ cinfoJsFiles c + [ (normalise (srcdir file), c) + | c <- cs + , srcdir <- cinfoSrcDirs c + , file <- cinfoHsFiles c + ++ cinfoCFiles c + ++ cinfoJsFiles c ]