Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new 'path' option to the REPL #1154

Merged
merged 1 commit into from
Jun 15, 2021
Merged

Add a new 'path' option to the REPL #1154

merged 1 commit into from
Jun 15, 2021

Conversation

robdockins
Copy link
Contributor

This lets the user reset the module search path. It is a bit of a
blunt instrument as it resets the entire path. Perhaps we should also
add the ability to add new paths to the front of the search order,
e.g. with a new :prependpath command?

Fixes #631

@pnwamk
Copy link
Contributor

pnwamk commented Apr 7, 2021

Semi-related (?) -- we recently merged a PR that gives remote clients the ability to "extend" the search path with new paths (while retaining the old and ensuring there are no duplicates).

PR: #1137

Relevant code:

extendSearchPath :: [FilePath] -> ServerState -> ServerState
extendSearchPath paths =
over moduleEnv $ \me -> me { meSearchPath = nubOrd $ paths ++ meSearchPath me }

I'm not sure there needs be a direct relationship between this (or future) addition(s) to the REPL per se, but just in case it's worth considering this broader feature on all fronts, there you go.

This lets the user reset the module search path. It is a bit of a
blunt instrument as it resets the entire path.  Perhaps we should also
add the ability to add new paths to the front of the search order,
e.g. with a new `:prependpath` command?

Fixes #631
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a :set path REPL option
2 participants