Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
istex
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
istex
Commits
eef5c951
Commit
eef5c951
authored
Dec 11, 2023
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it build cleanly on GHC 8.10.7 and GHC 9.4.7
parent
a34bb341
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
6 deletions
+13
-6
.gitignore
.gitignore
+3
-1
cabal.ghc-9.4.7.project
cabal.ghc-9.4.7.project
+4
-0
cabal.project
cabal.project
+2
-0
crawlerISTEX.cabal
crawlerISTEX.cabal
+3
-3
Client.hs
src/ISTEX/Client.hs
+1
-2
No files found.
.gitignore
View file @
eef5c951
.stack-work/
crawlerISTEX.cabal
*~
\ No newline at end of file
*~
dist-newstyle
tags
cabal.ghc-9.4.7.project
0 → 100644
View file @
eef5c951
with-compiler: ghc-9.4.7
packages: .
tests: True
cabal.project
0 → 100644
View file @
eef5c951
packages: .
with-compiler: ghc-8.10.7
crawlerISTEX.cabal
View file @
eef5c951
...
...
@@ -41,14 +41,14 @@ library
RecordWildCards
TypeOperators
build-depends:
aeson
aeson
< 2.3
, base >=4.7 && <5
, ghc
, http-client
, http-client-tls
, lens
, servant
, servant-client
, servant
>= 0.18.3 && < 0.20
, servant-client
>= 0.18.3 && < 0.20
, text
default-language: Haskell2010
...
...
src/ISTEX/Client.hs
View file @
eef5c951
...
...
@@ -5,7 +5,6 @@ module ISTEX.Client where
import
Control.Applicative
((
<|>
))
import
Data.Aeson
import
GHC.Generics
import
Panic
(
panic
)
import
Text.Read
(
readEither
)
import
Servant.API
...
...
@@ -36,7 +35,7 @@ parsePubDate :: Maybe T.Text -> Maybe Int
parsePubDate
Nothing
=
Nothing
parsePubDate
(
Just
pubDate
)
=
case
ePubDate
of
Left
err
->
panic
$
T
.
unpack
$
"[parseJSON] Cannot parse publicationDate (Int): "
<>
pubDate
<>
"("
<>
(
T
.
pack
err
)
<>
")"
Left
err
->
error
$
T
.
unpack
$
"[parseJSON] Cannot parse publicationDate (Int): "
<>
pubDate
<>
"("
<>
(
T
.
pack
err
)
<>
")"
Right
pubDate'
->
Just
pubDate'
where
ePubDate
=
readEither
(
T
.
unpack
pubDate
)
::
Either
String
Int
...
...
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