Expose CWD and import search paths in GHCi via new `:show paths` command
- Currently, GHCi provides a
:cdcommand but no respective builtin command to query the currently set path.
- Moreover, there's no obvious way to query the currently active
importPathsdynamic flags field, to find out which
-ioptions are currently in effect.
The attached patch extends
:show with a
:show paths subcommand, printing the CWD and the current value of
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