packages feed

ghci-ng 7.6.3.4 → 7.6.3.5

raw patch · 2 files changed

+21/−3 lines, 2 files

Files

ghc/InteractiveUI.hs view
@@ -318,6 +318,7 @@   "   :show linker                show current linker state\n" ++   "   :show modules               show the currently loaded modules\n" ++   "   :show packages              show the currently active package flags\n" +++  "   :show paths                 show the currently active search paths\n" ++   "   :show language              show the currently active language flags\n" ++   "   :show <setting>             show value of <setting>, which is one of\n" ++   "                                  [args, prog, prompt, editor, stop]\n" ++@@ -2155,6 +2156,7 @@         ["breaks"]   -> showBkptTable         ["context"]  -> showContext         ["packages"]  -> showPackages+        ["paths"]     -> showPaths         ["languages"] -> showLanguages -- backwards compat         ["language"]  -> showLanguages         ["lang"]      -> showLanguages -- useful abbreviation@@ -2260,6 +2262,19 @@         showFlag (TrustPackage    p) = text $ "  -trust " ++ p         showFlag (DistrustPackage p) = text $ "  -distrust " ++ p +showPaths :: GHCi ()+showPaths = do+  dflags <- getDynFlags+  liftIO $ do+    cwd <- getCurrentDirectory+    putStrLn $ showSDoc dflags $+      text "current working directory: " $$+        nest 2 (text cwd)+    let ipaths = importPaths dflags+    putStrLn $ showSDoc dflags $+      text ("module import search paths:"++if null ipaths then " none" else "") $$+        nest 2 (vcat (map text ipaths))+ showLanguages :: GHCi () showLanguages = getDynFlags >>= liftIO . showLanguages' False @@ -2417,7 +2432,7 @@   return (filter (w `isPrefixOf`) opts)     where opts = ["args", "prog", "prompt", "prompt2", "editor", "stop",                      "modules", "bindings", "linker", "breaks",-                     "context", "packages", "language", "imports"]+                     "context", "packages", "paths", "language", "imports"]  completeShowiOptions = wrapCompleter flagWordBreakChars $ \w -> do   return (filter (w `isPrefixOf`) ["language"])@@ -2506,7 +2521,7 @@ enclosingTickSpan md (RealSrcSpan src) = do   ticks <- getTickArray md   let line = srcSpanStartLine src-  ASSERT (inRange (bounds ticks) line) do+  ASSERT(inRange (bounds ticks) line) do   let toRealSrcSpan (UnhelpfulSpan _) = panic "enclosingTickSpan UnhelpfulSpan"       toRealSrcSpan (RealSrcSpan s) = s       enclosing_spans = [ pan | (_,pan) <- ticks ! line
ghci-ng.cabal view
@@ -1,5 +1,5 @@ name: ghci-ng-version: 7.6.3.4+version: 7.6.3.5 license: BSD3 license-file: LICENSE author: The GHC Team@@ -38,6 +38,9 @@       (<http://ghc.haskell.org/trac/ghc/ticket/8113 GHC#8113>)     .     * Supports being used via @cabal repl --with-ghc=ghci-ng@+    .+    * backported @:show paths@ support+      (<http://ghc.haskell.org/trac/ghc/ticket/8172 GHC#8172>)  extra-source-files: ghc/HsVersions.h rts/PosixSource.h