aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper
diff options
context:
space:
mode:
Diffstat (limited to 'src/CabalHelper')
-rw-r--r--src/CabalHelper/Runtime/Compat.hs14
-rw-r--r--src/CabalHelper/Runtime/Main.hs4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/CabalHelper/Runtime/Compat.hs b/src/CabalHelper/Runtime/Compat.hs
index c1bb3b3..cafbfc3 100644
--- a/src/CabalHelper/Runtime/Compat.hs
+++ b/src/CabalHelper/Runtime/Compat.hs
@@ -150,15 +150,15 @@ type UnitId = InstalledPackageId
-componentNameToCh :: a -> ComponentName -> ChComponentName
-componentNameToCh _ CLibName = ChLibName
+componentNameToCh :: ComponentName -> ChComponentName
+componentNameToCh CLibName = ChLibName
#if CH_MIN_VERSION_Cabal(2,0,0)
-componentNameToCh _ (CSubLibName n) = ChSubLibName (unUnqualComponentName' n)
-componentNameToCh _ (CFLibName n) = ChFLibName (unUnqualComponentName' n)
+componentNameToCh (CSubLibName n) = ChSubLibName (unUnqualComponentName' n)
+componentNameToCh (CFLibName n) = ChFLibName (unUnqualComponentName' n)
#endif
-componentNameToCh _ (CExeName n) = ChExeName (unUnqualComponentName' n)
-componentNameToCh _ (CTestName n) = ChTestName (unUnqualComponentName' n)
-componentNameToCh _ (CBenchName n) = ChBenchName (unUnqualComponentName' n)
+componentNameToCh (CExeName n) = ChExeName (unUnqualComponentName' n)
+componentNameToCh (CTestName n) = ChTestName (unUnqualComponentName' n)
+componentNameToCh (CBenchName n) = ChBenchName (unUnqualComponentName' n)
#if CH_MIN_VERSION_Cabal(1,25,0)
diff --git a/src/CabalHelper/Runtime/Main.hs b/src/CabalHelper/Runtime/Main.hs
index 3c90fbd..ecdbc2a 100644
--- a/src/CabalHelper/Runtime/Main.hs
+++ b/src/CabalHelper/Runtime/Main.hs
@@ -500,9 +500,9 @@ componentsMap lbi _v _distdir f = do
l' <- readIORef lr
r <- f c clbi bi
#if CH_MIN_VERSION_Cabal(2,0,0)
- writeIORef lr $ (componentNameToCh (unUnitId $ componentUnitId clbi) name, r):l'
+ writeIORef lr $ (componentNameToCh name, r):l'
#else
- writeIORef lr $ (componentNameToCh "" name, r):l'
+ writeIORef lr $ (componentNameToCh name, r):l'
#endif
reverse <$> readIORef lr