Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
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
haskell-gargantext
Commits
7f6848cd
Commit
7f6848cd
authored
Dec 03, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NGRAMS TABLE] Improve listNgramsChangedSince for negative version numbers
parent
85f14511
Pipeline
#638
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+11
-2
No files found.
src/Gargantext/API/Ngrams.hs
View file @
7f6848cd
...
...
@@ -862,6 +862,12 @@ tableNgramsPost :: RepoCmdM env err m => TabType -> NodeId -> Maybe ListType ->
tableNgramsPost
tabType
listId
mayList
=
putListNgrams
listId
(
ngramsTypeFromTabType
tabType
)
.
fmap
(
newNgramsElement
mayList
)
currentVersion
::
RepoCmdM
env
err
m
=>
m
Version
currentVersion
=
do
var
<-
view
repoVar
r
<-
liftIO
$
readMVar
var
pure
$
r
^.
r_version
tableNgramsPull
::
RepoCmdM
env
err
m
=>
ListId
->
NgramsType
->
Version
...
...
@@ -1169,5 +1175,8 @@ apiNgramsTableDoc dId = getTableNgramsDoc dId
-- > index all the corpus accordingly (TODO AD)
listNgramsChangedSince
::
RepoCmdM
env
err
m
=>
ListId
->
NgramsType
->
Version
->
m
(
Versioned
Bool
)
listNgramsChangedSince
listId
ngramsType
version
=
tableNgramsPull
listId
ngramsType
version
&
mapped
.
v_data
%~
(
==
mempty
)
listNgramsChangedSince
listId
ngramsType
version
|
version
<
0
=
Versioned
<$>
currentVersion
<*>
pure
True
|
otherwise
=
tableNgramsPull
listId
ngramsType
version
&
mapped
.
v_data
%~
(
==
mempty
)
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