diff --git a/src/IHaskell/Eval/Evaluate.hs b/src/IHaskell/Eval/Evaluate.hs index 32a9be95..7fd2fc64 100644 --- a/src/IHaskell/Eval/Evaluate.hs +++ b/src/IHaskell/Eval/Evaluate.hs @@ -741,6 +741,7 @@ evalCommand _ (Directive GetHelp _) state = do , " :option - Set an option." , " :option no- - Unset an option." , " :?, :help - Show this help text." + , " :sprint - Print a value without forcing evaluation." , "" , "Any prefix of the commands will also suffice, e.g. use :ty for :type." , "" diff --git a/src/tests/IHaskell/Test/Eval.hs b/src/tests/IHaskell/Test/Eval.hs index 04c742df..b080c01b 100644 --- a/src/tests/IHaskell/Test/Eval.hs +++ b/src/tests/IHaskell/Test/Eval.hs @@ -169,6 +169,10 @@ testEval = #endif ":k Maybe" `becomes` ["Maybe :: * -> *"] ":in String" `pages` ["type String = [Char] \t-- Defined in \8216GHC.Base\8217"] + [hereLit| + let x = ['a'..'z'] + :sprint x + |] `becomes` ["x = _"] it "captures stderr" $ do [hereLit| diff --git a/test/acceptance.nbconvert.in.ipynb b/test/acceptance.nbconvert.in.ipynb index fdd4d109..e219a8dc 100644 --- a/test/acceptance.nbconvert.in.ipynb +++ b/test/acceptance.nbconvert.in.ipynb @@ -964,11 +964,12 @@ " :type - Print expression type.\n", " :info - Print all info for a name.\n", " :hoogle - Search for a query on Hoogle.\n", - " :doc - Get documentation for an identifier via Hogole.\n", + " :doc - Get documentation for an identifier via Hoogle.\n", " :set -XFlag -Wall - Set an option (like ghci).\n", " :option - Set an option.\n", " :option no- - Unset an option.\n", " :?, :help - Show this help text.\n", + " :sprint - Print a value without forcing evaluation.\n", "\n", "Any prefix of the commands will also suffice, e.g. use :ty for :type.\n", "\n",