From 4b386477ec20610cf7daec261474b9ee4380abad Mon Sep 17 00:00:00 2001 From: Brian Huffman Date: Wed, 4 Oct 2017 21:22:59 -0700 Subject: [PATCH] Avoid creating a new option when :set is used with a prefix of a name. Fixes #450. --- src/Cryptol/REPL/Monad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cryptol/REPL/Monad.hs b/src/Cryptol/REPL/Monad.hs index 1d58c408..0784b119 100644 --- a/src/Cryptol/REPL/Monad.hs +++ b/src/Cryptol/REPL/Monad.hs @@ -538,7 +538,7 @@ setUser name val = case lookupTrieExact name userOptions of writeEnv v writeEnv ev = do optEff opt ev - modifyRW_ (\rw -> rw { eUserEnv = Map.insert name ev (eUserEnv rw) }) + modifyRW_ (\rw -> rw { eUserEnv = Map.insert (optName opt) ev (eUserEnv rw) }) splitOptArgs :: String -> [String] splitOptArgs = unfoldr (parse "")