mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-16 11:22:33 +03:00
Remember the path when editing.
This commit is contained in:
parent
2faa44e17b
commit
35a3843685
@ -742,6 +742,7 @@ editCmd path
|
||||
|
||||
| otherwise = do
|
||||
_ <- replEdit path
|
||||
setEditPath path
|
||||
reloadCmd
|
||||
|
||||
moduleCmd :: String -> REPL ()
|
||||
|
@ -40,7 +40,7 @@ module Cryptol.REPL.Monad (
|
||||
, getTypeNames
|
||||
, getPropertyNames
|
||||
, getModNames
|
||||
, LoadedModule(..), getLoadedMod, setLoadedMod, clearLoadedMod
|
||||
, LoadedModule(..), getLoadedMod, setLoadedMod, clearLoadedMod, setEditPath
|
||||
, setSearchPath, prependSearchPath
|
||||
, getPrompt
|
||||
, shouldContinue
|
||||
@ -313,6 +313,9 @@ setLoadedMod n = do
|
||||
modifyRW_ (\ rw -> rw { eLoadedMod = Just n })
|
||||
updateREPLTitle
|
||||
|
||||
setEditPath :: FilePath -> REPL ()
|
||||
setEditPath p = setLoadedMod LoadedModule { lName = Nothing, lPath = p }
|
||||
|
||||
getLoadedMod :: REPL (Maybe LoadedModule)
|
||||
getLoadedMod = eLoadedMod `fmap` getRW
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user