From 634c5a03e757663bf86d1ffad1ce2c6086d4483f Mon Sep 17 00:00:00 2001 From: Brian Huffman Date: Mon, 17 Sep 2018 09:46:00 -0700 Subject: [PATCH] Suppress REPL instantiation messages when warnDefaulting = off. Fixes #543. --- src/Cryptol/REPL/Command.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Cryptol/REPL/Command.hs b/src/Cryptol/REPL/Command.hs index cf46bd04f..2c697a038 100644 --- a/src/Cryptol/REPL/Command.hs +++ b/src/Cryptol/REPL/Command.hs @@ -1211,8 +1211,10 @@ replEvalExpr expr = case ts of [] -> return () _ -> - do rPutStrLn "Showing a specific instance of polymorphic result:" - mapM_ warnDefault ts + do EnvBool warnDefaulting <- getUser "warnDefaulting" + when warnDefaulting $ + do rPutStrLn "Showing a specific instance of polymorphic result:" + mapM_ warnDefault ts warnDefault (x,t) = rPrint (" *" <+> nest 2 ("Using" <+> quotes (pp t) <+> "for" <+>