From ed9a24efbd336a2a7c3f532a26625fbfbc10e36b Mon Sep 17 00:00:00 2001 From: Kevin Quick Date: Mon, 15 Mar 2021 11:42:23 -0700 Subject: [PATCH] Remove unneeded arguments to nameResult and versionResult. --- what4/src/What4/Protocol/SMTLib2.hs | 10 +++++----- what4/test/ExprBuilderSMTLib2.hs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/what4/src/What4/Protocol/SMTLib2.hs b/what4/src/What4/Protocol/SMTLib2.hs index 0b479495..97644950 100644 --- a/what4/src/What4/Protocol/SMTLib2.hs +++ b/what4/src/What4/Protocol/SMTLib2.hs @@ -1192,8 +1192,8 @@ ppSolverVersionError err = na Nothing = "n/a" -- | Get the result of a version query -nameResult :: f h -> Streams.InputStream Text -> IO Text -nameResult _ s = +nameResult :: Streams.InputStream Text -> IO Text +nameResult s = let cmd = SMT2.getName in tryJust filterAsync (Streams.parseFromStream (parseSExp parseSMTLib2String) s) >>= @@ -1220,8 +1220,8 @@ queryErrorBehavior conn resp = -- | Get the result of a version query -versionResult :: f h -> Streams.InputStream Text -> IO Text -versionResult _ s = +versionResult :: Streams.InputStream Text -> IO Text +versionResult s = let cmd = SMT2.getVersion in tryJust filterAsync (Streams.parseFromStream (parseSExp parseSMTLib2String) s) >>= @@ -1246,7 +1246,7 @@ checkSolverVersion' boundsMap proc = Nothing -> done Just bnds -> do getVersion conn - res <- versionResult conn (solverResponse proc) + res <- versionResult (solverResponse proc) case Versions.version res of Left e -> pure (Left (UnparseableVersion e)) Right actualVer -> diff --git a/what4/test/ExprBuilderSMTLib2.hs b/what4/test/ExprBuilderSMTLib2.hs index a2395261..fa52a561 100644 --- a/what4/test/ExprBuilderSMTLib2.hs +++ b/what4/test/ExprBuilderSMTLib2.hs @@ -885,12 +885,12 @@ testSolverInfo = testGroup "solver info queries" $ [ testCase "test get solver version" $ withOnlineZ3 $ \_ proc -> do let conn = solverConn proc getVersion conn - _ <- versionResult conn (solverResponse proc) + _ <- versionResult (solverResponse proc) pure () , testCase "test get solver name" $ withOnlineZ3 $ \_ proc -> do let conn = solverConn proc getName conn - nm <- nameResult conn (solverResponse proc) + nm <- nameResult (solverResponse proc) nm @?= "Z3" ]