From 2e9e036cb54b580e886dd11917df71961735adfa Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Mon, 25 Sep 2017 13:53:13 +0200 Subject: Execute deprecations --- Distribution/Helper.hs | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) (limited to 'Distribution') diff --git a/Distribution/Helper.hs b/Distribution/Helper.hs index 6c31208..ec79b85 100644 --- a/Distribution/Helper.hs +++ b/Distribution/Helper.hs @@ -64,10 +64,8 @@ module Distribution.Helper ( -- * Managing @dist/@ , prepare - , prepare' , reconfigure , writeAutogenFiles - , writeAutogenFiles' -- * $libexec related error handling , LibexecNotFoundError(..) @@ -347,43 +345,16 @@ getSomeConfigState = ask >>= \QueryEnv {..} -> do return $ SomeLocalBuildInfo pkgDbs eps srcDirs ghcOpts ghcSrcOpts ghcPkgOpts ghcMergedPkgOpts ghcLangOpts pkgLics fls cfls ndcfls (comp, compVer) -prepare :: MonadIO m - => (FilePath -> [String] -> String -> IO String) - -> FilePath - -> FilePath - -> m () -prepare readProc projdir distdir = liftIO $ do - exe <- findLibexecExe - void $ readProc exe [projdir, distdir] "" - -{-# DEPRECATED prepare - "Will be replaced by prepare' in the next major release" #-} - -- | Make sure the appropriate helper executable for the given project is -- installed and ready to run queries. -prepare' :: MonadIO m => QueryEnv -> m () -prepare' qe = +prepare :: MonadIO m => QueryEnv -> m () +prepare qe = liftIO $ void $ invokeHelper qe [] -writeAutogenFiles :: MonadIO m - => (FilePath -> [String] -> String -> IO String) - -> FilePath - -- ^ Path to project directory, i.e. the one containing the - -- @project.cabal@ file - -> FilePath - -- ^ Path to the @dist/@ directory - -> m () -writeAutogenFiles readProc projdir distdir = liftIO $ do - exe <- findLibexecExe - void $ readProc exe [projdir, distdir, "write-autogen-files"] "" - -{-# DEPRECATED writeAutogenFiles - "Will be replaced by writeAutogenFiles' in the next major release" #-} - -- | Create @cabal_macros.h@ and @Paths_\@ possibly other generated files -- in the usual place. -writeAutogenFiles' :: MonadIO m => QueryEnv -> m () -writeAutogenFiles' qe = +writeAutogenFiles :: MonadIO m => QueryEnv -> m () +writeAutogenFiles qe = liftIO $ void $ invokeHelper qe ["write-autogen-files"] -- | Get the path to the sandbox package-db in a project -- cgit v1.2.3