diff --git a/CabalHelper/Data.hs b/CabalHelper/Data.hs
--- a/CabalHelper/Data.hs
+++ b/CabalHelper/Data.hs
@@ -26,6 +26,7 @@
 import System.FilePath
 import System.Directory
 import System.IO.Temp
+import Prelude
 
 withHelperSources :: (FilePath -> IO a) -> IO a
 withHelperSources action = withSystemTempDirectory "cabal-helper" $ \dir -> do
diff --git a/CabalHelper/Main.hs b/CabalHelper/Main.hs
--- a/CabalHelper/Main.hs
+++ b/CabalHelper/Main.hs
@@ -90,7 +90,7 @@
      ++"DIST_DIR ( version\n"
      ++"         | print-lbi\n"
      ++"         | write-autogen-files\n"
-     ++"         | compiler-version"
+     ++"         | compiler-version\n"
      ++"         | ghc-options     [--with-inplace]\n"
      ++"         | ghc-src-options [--with-inplace]\n"
      ++"         | ghc-pkg-options [--with-inplace]\n"
@@ -201,17 +201,11 @@
 
     "ghc-merged-pkg-options":flags -> do
       let pd = localPkgDescr lbi
-      res <- mconcat . map snd <$> (componentsMap lbi v distdir $ \c clbi bi -> let
-        outdir = componentOutDir lbi c
-        opts = componentGhcOptions normal lbi bi clbi outdir
-        comp = compiler lbi
-        opts' = mempty {
+      res <- mconcat . map snd <$> (componentOptions' lvd True flags (\_ _ o -> return o) $ \opts -> mempty {
                        ghcOptPackageDBs = ghcOptPackageDBs opts,
                        ghcOptPackages   = ghcOptPackages opts,
                        ghcOptHideAllPackages = ghcOptHideAllPackages opts
-                   }
-
-         in return opts')
+                   })
 
       let res' = res { ghcOptPackageDBs = nub $ ghcOptPackageDBs res }
 
@@ -286,7 +280,7 @@
 
     reverse <$> readIORef lr
 
-componentOptions (lbi, v, distdir) inplaceFlag flags f = do
+componentOptions' (lbi, v, distdir) inplaceFlag flags rf f = do
   let pd = localPkgDescr lbi
   componentsMap lbi v distdir $ \c clbi bi -> let
            outdir = componentOutDir lbi c
@@ -295,11 +289,12 @@
                                ["--with-inplace"] -> (clbi, mempty)
                                [] -> removeInplaceDeps v lbi pd clbi
            opts = componentGhcOptions normal lbi bi clbi' outdir
-           comp = compiler lbi
            opts' = f opts
 
-         in renderGhcOptions' lbi v $ opts' `mappend` adopts
+         in rf lbi v $ opts' `mappend` adopts
 
+componentOptions (lbi, v, distdir) inplaceFlag flags f =
+    componentOptions' (lbi, v, distdir) inplaceFlag flags renderGhcOptions' f
 
 componentNameToCh CLibName = ChLibName
 componentNameToCh (CExeName n) = ChExeName n
diff --git a/cabal-helper.cabal b/cabal-helper.cabal
--- a/cabal-helper.cabal
+++ b/cabal-helper.cabal
@@ -1,5 +1,5 @@
 name:                cabal-helper
-version:             0.3.6.0
+version:             0.3.7.0
 synopsis:            Simple interface to some of Cabal's configuration state used by ghc-mod
 description:
     @cabal-helper@ provides a library which wraps the internal use of executables
