Skip to content

Commit

Permalink
Fix a couple of deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd authored and gibiansky committed Mar 5, 2017
1 parent 38ac12b commit 00478f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions ihaskell.cabal
Expand Up @@ -175,6 +175,7 @@ Test-Suite hspec
ihaskell,
here,
hspec,
hspec-contrib,
HUnit,
ghc,
ghc-paths,
Expand Down
6 changes: 3 additions & 3 deletions src/IHaskell/Eval/Hoogle.hs
Expand Up @@ -54,10 +54,10 @@ instance FromJSON HoogleResponse where
-- an error message or the successful JSON result.
query :: String -> IO (Either String String)
query str = do
request <- parseUrl $ queryUrl $ urlEncode str
request <- parseUrlThrow $ queryUrl $ urlEncode str
mgr <- newManager tlsManagerSettings
catch
(Right . CBS.unpack . LBS.toStrict . responseBody <$> withManager tlsManagerSettings
(httpLbs request))
(Right . CBS.unpack . LBS.toStrict . responseBody <$> httpLbs request mgr)
(\e -> return $ Left $ show (e :: SomeException))

where
Expand Down
2 changes: 1 addition & 1 deletion src/tests/IHaskell/Test/Parser.hs
Expand Up @@ -7,7 +7,7 @@ import Prelude
import Data.String.Here (hereLit)

import Test.Hspec
import Test.Hspec.HUnit
import Test.Hspec.Contrib.HUnit
import Test.HUnit (assertBool, assertFailure)

import IHaskell.Test.Util (ghc, strip)
Expand Down

2 comments on commit 00478f3

@thomasjm
Copy link
Member

@thomasjm thomasjm commented on 00478f3 Mar 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erikd I think this broke the build, given the current resolver. In stack.yaml it specifies lts-6.2, which specifies http-client-0.4.28, which doesn't contain parseUrlThrow, and I'm getting an exception when I run stack build on the latest IHaskell

Exception is

/home/tom/tools/IHaskell/src/IHaskell/Eval/Hoogle.hs:57:14: Not in scope: ‘parseUrlThrow’

@erikd
Copy link
Contributor Author

@erikd erikd commented on 00478f3 Mar 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomasjm I'll take a look.

Please sign in to comment.