Commit 0077455e authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Remove old withSocketsDo

parent 84e9efb7
...@@ -12,7 +12,6 @@ import Network.Api.Arxiv (Expression(..), Field(..), (/*/), (/+/),(/-/)) ...@@ -12,7 +12,6 @@ import Network.Api.Arxiv (Expression(..), Field(..), (/*/), (/+/),(/-/))
import Network.HTTP.Conduit (parseRequest) import Network.HTTP.Conduit (parseRequest)
import Network.HTTP.Simple as HT import Network.HTTP.Simple as HT
import Network.HTTP.Types.Status import Network.HTTP.Types.Status
import Network.Socket (withSocketsDo)
import Text.HTML.TagSoup import Text.HTML.TagSoup
import qualified Data.ByteString as B hiding (unpack) import qualified Data.ByteString as B hiding (unpack)
import qualified Data.ByteString.Char8 as B (unpack) import qualified Data.ByteString.Char8 as B (unpack)
...@@ -31,11 +30,11 @@ type Soup = Tag String ...@@ -31,11 +30,11 @@ type Soup = Tag String
------------------------------------------------------------ ------------------------------------------------------------
-- | Simple Query search for terms in All fields -- | Simple Query search for terms in All fields
apiSimple :: Maybe Limit -> [String] -> IO [Result] apiSimple :: Maybe Limit -> [String] -> IO [Result]
apiSimple limit query = withSocketsDo (execQuery limit $ simpleQuery query) apiSimple limit query = execQuery limit $ simpleQuery query
-- | Complex Query search for terms in specific fields to be defined by Ax.Query -- | Complex Query search for terms in specific fields to be defined by Ax.Query
apiComplex :: Maybe Limit -> Ax.Query -> IO [Result] apiComplex :: Maybe Limit -> Ax.Query -> IO [Result]
apiComplex limit query = withSocketsDo (execQuery limit query) apiComplex limit query = execQuery limit query
------------------------------------------------------------ ------------------------------------------------------------
simpleQuery :: [String] -> Ax.Query simpleQuery :: [String] -> Ax.Query
......
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