[GHC] #8172: Expose CWD and import search paths in GHCi via new `:show paths` command
#8172: Expose CWD and import search paths in GHCi via new `:show paths` command -------------------------------------------+------------------------------- Reporter: hvr | Owner: hvr Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.7 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Easy (less than 1 hour) | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: -------------------------------------------+------------------------------- - Currently, GHCi provides a `:cd` command but no respective builtin command to query the currently set path. - Moreover, there's no obvious way to query the currently active `importPaths` dynamic flags field, to find out which `-i` options are currently in effect. The attached patch extends `:show` with a `:show paths` subcommand, printing the CWD and the current value of `importPaths`: {{{ Ok, modules loaded: Main, InteractiveUI, Paths_ghci_ng, GhciMonad, GhciTags. λ> :show paths current working directory: /home/hvr/Haskell/My/ghci-ng module import search paths: dist/build/ghci-ng/ghci-ng-tmp ghc dist/build/autogen λ> :set -i λ> :show paths current working directory: /home/hvr/Haskell/My/ghci-ng module import search paths: none
:cd /tmp Warning: changing directory causes all loaded modules to be unloaded, because the search path has changed.
:show paths current working directory: /tmp module import search paths: none }}}
-- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8172> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8172: Expose CWD and import search paths in GHCi via new `:show paths` command -------------------------------+------------------------------------------- Reporter: hvr | Owner: hvr Type: feature | Status: patch request | Milestone: 7.8.1 Priority: normal | Version: 7.7 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Changes (by hvr): * status: new => patch * milestone: => 7.8.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8172#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8172: Expose CWD and import search paths in GHCi via new `:show paths` command -------------------------------+------------------------------------------- Reporter: hvr | Owner: hvr Type: feature | Status: patch request | Milestone: 7.8.1 Priority: normal | Version: 7.7 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Comment (by simonpj): Sounds great to me, thank you. Needs (a) user documentation, (b) test. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8172#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8172: Expose CWD and import search paths in GHCi via new `:show paths` command -------------------------------+------------------------------------------- Reporter: hvr | Owner: hvr Type: feature | Status: patch request | Milestone: 7.8.1 Priority: normal | Version: 7.7 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:56e28a3fbb7f911e27feac9499f3204d739eead0/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="56e28a3fbb7f911e27feac9499f3204d739eead0" GHCi: Implement new `:show paths` sub-command `:show paths` dumps the current working directory as well as the current value of the `importPaths` dynamic flags field. This addresses #8172 Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8172#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8172: Expose CWD and import search paths in GHCi via new `:show paths` command -------------------------------+------------------------------------------- Reporter: hvr | Owner: hvr Type: feature | Status: patch request | Milestone: 7.8.1 Priority: normal | Version: 7.7 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:b982ab40843f360fa12a638758ee91322526625d/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="b982ab40843f360fa12a638758ee91322526625d" User guide entry for `:shows paths` sub-command This also adds an entry to the release notes section. See #8172 for more details Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8172#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8172: Expose CWD and import search paths in GHCi via new `:show paths` command -------------------------------+------------------------------------------- Reporter: hvr | Owner: hvr Type: feature | Status: patch request | Milestone: 7.8.1 Priority: normal | Version: 7.7 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:d4ef6c38b4b8badcfc198f5c25f05ea1fc8a9ebf/testsuite]: {{{ #!CommitTicketReference repository="testsuite" revision="d4ef6c38b4b8badcfc198f5c25f05ea1fc8a9ebf" Add test-case for #8172 Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8172#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8172: Expose CWD and import search paths in GHCi via new `:show paths` command -------------------------------+------------------------------------------- Reporter: hvr | Owner: hvr Type: feature | Status: closed request | Milestone: 7.8.1 Priority: normal | Version: 7.7 Component: GHCi | Keywords: Resolution: fixed | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Changes (by thoughtpolice): * status: patch => closed * resolution: => fixed Comment: Herbert, this looks like it's done. You can reopen if necessary. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8172#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8172: Expose CWD and import search paths in GHCi via new `:show paths` command -------------------------------------+--------------------------------- Reporter: hvr | Owner: hvr Type: feature request | Status: closed Priority: normal | Milestone: 7.8.1 Component: GHCi | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+--------------------------------- Comment (by Thomas Miedema <thomasmiedema@…>): In [changeset:"da84fd5475d189c39bd3e12d29f45618c92ed800/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="da84fd5475d189c39bd3e12d29f45618c92ed800" Testsuite Windows: fix T8172 (#8172) Use the new function `normalise_drive_letter` to change D:\ to C:\ before comparing outputs. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8172#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC