[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

#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

#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

#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
participants (1)
-
GHC