Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
crawlers
hal
Commits
1602ca38
Commit
1602ca38
authored
Aug 27, 2019
by
Mudada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update resolver version, ServantError~>ClientError
parent
bf57642f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
HAL.hs
src/HAL.hs
+4
-5
stack.yaml
stack.yaml
+1
-1
No files found.
src/HAL.hs
View file @
1602ca38
...
...
@@ -8,21 +8,20 @@ import Data.Text
import
Network.HTTP.Client
(
newManager
)
import
Network.HTTP.Client.TLS
(
tlsManagerSettings
)
import
Servant.Client
(
BaseUrl
(
..
),
Scheme
(
..
),
ClientM
,
ServantError
,
runClientM
,
mkClientEnv
)
import
Servant.Client
(
BaseUrl
(
..
),
Scheme
(
..
),
ClientM
,
ClientError
,
runClientM
,
mkClientEnv
)
import
HAL.Client
import
HAL.Doc
runHalAPIClient
::
ClientM
(
Response
Doc
)
->
IO
(
Either
Serva
ntError
(
Response
Doc
))
runHalAPIClient
::
ClientM
(
Response
Doc
)
->
IO
(
Either
Clie
ntError
(
Response
Doc
))
runHalAPIClient
cmd
=
do
manager'
<-
newManager
tlsManagerSettings
runClientM
cmd
(
mkClientEnv
manager'
$
BaseUrl
Https
"api.archives-ouvertes.fr"
443
""
)
runStructureRequest
::
Maybe
Text
->
IO
(
Either
Serva
ntError
(
Response
Doc
))
runStructureRequest
::
Maybe
Text
->
IO
(
Either
Clie
ntError
(
Response
Doc
))
runStructureRequest
rq
=
runHalAPIClient
$
structure
def
rq
(
Just
10000
)
runSearchRequest
::
[
Text
]
->
IO
(
Either
Serva
ntError
(
Response
Doc
))
runSearchRequest
::
[
Text
]
->
IO
(
Either
Clie
ntError
(
Response
Doc
))
runSearchRequest
rq
=
runHalAPIClient
$
search
def
rq
Nothing
Nothing
Nothing
stack.yaml
View file @
1602ca38
...
...
@@ -17,7 +17,7 @@
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver
:
lts-1
3.10
resolver
:
lts-1
4.1
# User packages to be built.
# Various formats can be used as shown in the example below.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment