diff --git a/saw/SAWScript/REPL/Command.hs b/saw/SAWScript/REPL/Command.hs index e23d40d2c3..f7927bbffa 100644 --- a/saw/SAWScript/REPL/Command.hs +++ b/saw/SAWScript/REPL/Command.hs @@ -154,7 +154,9 @@ runCommand c = case c of typeOfCmd :: String -> REPL () -typeOfCmd str = +typeOfCmd str + | null str = do io $ putStrLn $ "[error] :type requires an argument" + | otherwise = do let tokens = SAWScript.Lexer.lexSAW replFileName str expr <- case SAWScript.Parser.parseExpression tokens of Left err -> fail (show err)