aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-03-29 03:43:19 +0100
committerDaniel Gröber <dxld@darkboxed.org>2019-03-29 03:43:19 +0100
commitac6047c57d7b2c1ccbea112c0c2bdefcbc2f251d (patch)
treec6c1192eec1ccbd5ef88cb7bd66fa9f228bc292f
parentce844a9402e4759562b737994979a58907e4e98a (diff)
Add accessor for ChModuleName newtype
-rw-r--r--src/CabalHelper/Shared/InterfaceTypes.hs2
-rw-r--r--tests/GhcSession.hs3
2 files changed, 1 insertions, 4 deletions
diff --git a/src/CabalHelper/Shared/InterfaceTypes.hs b/src/CabalHelper/Shared/InterfaceTypes.hs
index 5cdd98c..37758bc 100644
--- a/src/CabalHelper/Shared/InterfaceTypes.hs
+++ b/src/CabalHelper/Shared/InterfaceTypes.hs
@@ -58,7 +58,7 @@ data ChLibraryName = ChMainLibName
| ChSubLibName String
deriving (Eq, Ord, Read, Show, Generic)
-newtype ChModuleName = ChModuleName String
+newtype ChModuleName = ChModuleName { unChModuleName :: String }
deriving (Eq, Ord, Read, Show, Generic)
data ChComponentInfo = ChComponentInfo
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs
index 80e9d17..46ccab9 100644
--- a/tests/GhcSession.hs
+++ b/tests/GhcSession.hs
@@ -444,9 +444,6 @@ copyMuliPackageProject srcdir destdir copyPkgExtra = do
, "--output-directory="++destdir </> pkgdir ]
copyPkgExtra (srcdir </> pkgdir) (destdir </> pkgdir)
-unChModuleName :: ChModuleName -> String
-unChModuleName (ChModuleName mn) = mn
-
cabalInstallVersion :: IO Version
cabalInstallVersion =
parseVer . trim <$> readProcess "cabal" ["--numeric-version"] ""