Commit 00478f3b authored by Erik de Castro Lopo's avatar Erik de Castro Lopo Committed by Andrew Gibiansky

Fix a couple of deprecation warnings

parent 38ac12b5
...@@ -175,6 +175,7 @@ Test-Suite hspec ...@@ -175,6 +175,7 @@ Test-Suite hspec
ihaskell, ihaskell,
here, here,
hspec, hspec,
hspec-contrib,
HUnit, HUnit,
ghc, ghc,
ghc-paths, ghc-paths,
......
...@@ -54,10 +54,10 @@ instance FromJSON HoogleResponse where ...@@ -54,10 +54,10 @@ instance FromJSON HoogleResponse where
-- an error message or the successful JSON result. -- an error message or the successful JSON result.
query :: String -> IO (Either String String) query :: String -> IO (Either String String)
query str = do query str = do
request <- parseUrl $ queryUrl $ urlEncode str request <- parseUrlThrow $ queryUrl $ urlEncode str
mgr <- newManager tlsManagerSettings
catch catch
(Right . CBS.unpack . LBS.toStrict . responseBody <$> withManager tlsManagerSettings (Right . CBS.unpack . LBS.toStrict . responseBody <$> httpLbs request mgr)
(httpLbs request))
(\e -> return $ Left $ show (e :: SomeException)) (\e -> return $ Left $ show (e :: SomeException))
where where
......
...@@ -7,7 +7,7 @@ import Prelude ...@@ -7,7 +7,7 @@ import Prelude
import Data.String.Here (hereLit) import Data.String.Here (hereLit)
import Test.Hspec import Test.Hspec
import Test.Hspec.HUnit import Test.Hspec.Contrib.HUnit
import Test.HUnit (assertBool, assertFailure) import Test.HUnit (assertBool, assertFailure)
import IHaskell.Test.Util (ghc, strip) import IHaskell.Test.Util (ghc, strip)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment