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
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
Christian Merten
haskell-gargantext
Commits
a08eff3a
Unverified
Commit
a08eff3a
authored
Feb 28, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NGRAMS-REPO]: special case for "pull"
parent
193c1ba1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
23 deletions
+36
-23
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+36
-23
No files found.
src/Gargantext/API/Ngrams.hs
View file @
a08eff3a
...
@@ -749,7 +749,20 @@ tableNgramsPatch :: (HasNgramError err, HasInvalidError err,
...
@@ -749,7 +749,20 @@ tableNgramsPatch :: (HasNgramError err, HasInvalidError err,
=>
CorpusId
->
Maybe
TabType
->
ListId
=>
CorpusId
->
Maybe
TabType
->
ListId
->
Versioned
NgramsTablePatch
->
Versioned
NgramsTablePatch
->
m
(
Versioned
NgramsTablePatch
)
->
m
(
Versioned
NgramsTablePatch
)
tableNgramsPatch
_corpusId
maybeTabType
listId
(
Versioned
p_version
p_table
)
=
do
tableNgramsPatch
_corpusId
maybeTabType
listId
(
Versioned
p_version
p_table
)
|
p_table
==
mempty
=
do
let
ngramsType
=
ngramsTypeFromTabType
maybeTabType
var
<-
view
repoVar
r
<-
liftIO
$
readMVar
var
let
q
=
mconcat
$
take
(
r
^.
r_version
-
p_version
)
(
r
^.
r_history
)
q_table
=
q
^.
_PatchMap
.
at
ngramsType
.
_Just
.
_PatchMap
.
at
listId
.
_Just
pure
(
Versioned
(
r
^.
r_version
)
q_table
)
|
otherwise
=
do
let
ngramsType
=
ngramsTypeFromTabType
maybeTabType
let
ngramsType
=
ngramsTypeFromTabType
maybeTabType
(
p0
,
p0_validity
)
=
PM
.
singleton
listId
p_table
(
p0
,
p0_validity
)
=
PM
.
singleton
listId
p_table
(
p
,
p_validity
)
=
PM
.
singleton
ngramsType
p0
(
p
,
p_validity
)
=
PM
.
singleton
ngramsType
p0
...
...
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