Skip to content

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

Merged
robdockins merged 1 commit intomasterfrom
set-path
Jun 15, 2021
Merged

Add a new 'path' option to the REPL#1154
robdockins merged 1 commit intomasterfrom
set-path

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

@robdockins robdockins requested a review from brianhuffman April 6, 2021 22:22
@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
@robdockins robdockins merged commit 6669193 into master Jun 15, 2021
@RyanGlScott RyanGlScott deleted the set-path branch March 22, 2024 14:48
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