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
0
Issues
0
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
Przemyslaw Kaminski
hal
Commits
bfa9069b
Commit
bfa9069b
authored
Dec 11, 2023
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it compile cleanly on GHC 8.10.7 and GHC 9.4.7
parent
25a1e955
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
cabal.ghc-9.4.7.project
cabal.ghc-9.4.7.project
+4
-0
crawlerHAL.cabal
crawlerHAL.cabal
+3
-3
HAL.hs
src/HAL.hs
+2
-2
Corpus.hs
src/HAL/Doc/Corpus.hs
+3
-1
No files found.
cabal.ghc-9.4.7.project
0 → 100644
View file @
bfa9069b
with-compiler: ghc-9.4.7
packages: .
tests: True
crawlerHAL.cabal
View file @
bfa9069b
...
...
@@ -48,7 +48,7 @@ library
RecordWildCards
TypeOperators
build-depends:
aeson >= 1.5.6 && <
1.6
aeson >= 1.5.6 && <
2.3
, base >=4.7 && <5
, bytestring >= 0.11.0 && < 0.13
, conduit >= 1.3.5 && < 1.4
...
...
@@ -62,8 +62,8 @@ library
, optparse-applicative >= 0.17 && < 0.19
, protolude >= 0.3.3 && < 0.4
, scientific >= 0.3.7.0 && < 0.4
, servant >= 0.19 && < 0.2
1
, servant-client >= 0.19 && < 0.2
1
, servant >= 0.19 && < 0.2
0
, servant-client >= 0.19 && < 0.2
0
, split >= 0.2.3.5 && < 0.3
, text >= 1.2.3.0 && < 2.1
, text-format >= 0.3.2.1 && < 0.4
...
...
src/HAL.hs
View file @
bfa9069b
module
HAL
where
{-# LANGUAGE BangPatterns #-}
module
HAL
where
import
Conduit
import
Control.Monad
import
Control.Monad.Reader
...
...
src/HAL/Doc/Corpus.hs
View file @
bfa9069b
...
...
@@ -6,11 +6,13 @@ import Control.Lens qualified as L
import
Data.Aeson
import
Data.Default
import
Data.Map.Strict
qualified
as
Map
import
Data.String
import
GHC.Generics
import
HAL.Utils
(
allLangs
,
langAbstractS
)
import
Data.LanguageCodes
(
ISO639_1
(
..
))
import
Protolude
import
Servant.API
(
ToHttpApiData
(
..
))
import
qualified
Data.Text
as
T
data
Corpus
=
Corpus
{
_corpus_docid
::
Text
...
...
@@ -42,7 +44,7 @@ instance FromJSON Corpus where
abstracts
<-
mapM
(
\
lang
->
do
ma
<-
o
.:?
(
langAbstractS
lang
)
ma
<-
o
.:?
(
fromString
$
T
.
unpack
$
langAbstractS
lang
)
pure
$
(
\
a
->
(
lang
,
a
))
<$>
ma
)
allLangs
let
_corpus_abstract_lang_map
=
Map
.
fromList
$
catMaybes
abstracts
...
...
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