From ddcbebfa398ce90e561489841e99a5c7732d202f Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Wed, 10 Oct 2018 21:53:11 +0200 Subject: Remove unused parameter from componentNameToCh --- src/CabalHelper/Runtime/Compat.hs | 14 +++++++------- src/CabalHelper/Runtime/Main.hs | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') 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 -- cgit v1.2.3