diff --git a/src/GHCMod.hs b/src/GHCMod.hs index 8d54aab..d83aae9 100644 --- a/src/GHCMod.hs +++ b/src/GHCMod.hs @@ -190,10 +190,8 @@ usage = \ - boot\n\ \ Internal command used by the emacs frontend.\n\ \\n\ - \ - legacy-interactive [OPTIONS...]\n\ - \ ghc-modi compatibility mode.\n\ - \ *Options*\n" - ++ (unlines $ indent <$> optionUsage indent globalArgSpec) + \ - legacy-interactive\n\ + \ ghc-modi compatibility mode.\n" where indent = (" "++) diff --git a/src/GHCModi.hs b/src/GHCModi.hs index 0238957..602e3e1 100644 --- a/src/GHCModi.hs +++ b/src/GHCModi.hs @@ -7,10 +7,13 @@ module Main where import System.Exit import System.Process +import System.FilePath import System.Environment +import Paths_ghc_mod main :: IO () main = do args <- getArgs - h <- spawnProcess "ghc-mod" $ ["legacy-interactive"] ++ args + bindir <- getBinDir + h <- spawnProcess (bindir "ghc-mod") $ ["legacy-interactive"] ++ args exitWith =<< waitForProcess h