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
1441aa53
Commit
1441aa53
authored
Mar 19, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
ssh://gitlab.iscpif.fr:20022/gargantext/haskell-gargantext
into dev
parents
41cf1ee9
fb50bd61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+4
-4
No files found.
src/Gargantext/API/Ngrams.hs
View file @
1441aa53
...
...
@@ -55,7 +55,7 @@ import Data.Map.Strict (Map)
import
qualified
Data.Set
as
Set
import
Control.Category
((
>>>
))
import
Control.Concurrent
import
Control.Lens
(
makeLenses
,
makePrisms
,
Getter
,
Prism
'
,
prism'
,
Iso
'
,
iso
,
from
,
(
.~
),
(
.
=
),
(
#
),
to
,
folded
,
{-withIndex, ifolded,-}
view
,
use
,
(
^.
),
(
^..
),
(
^?
),
(
+~
),
(
%~
),
(
%=
),
sumOf
,
at
,
_Just
,
Each
(
..
),
itraverse_
,
both
,
mapped
,
forOf_
)
import
Control.Lens
(
makeLenses
,
makePrisms
,
Getter
,
Prism
'
,
prism'
,
Iso
'
,
iso
,
from
,
(
.~
),
(
?
=
),
(
#
),
to
,
folded
,
{-withIndex, ifolded,-}
view
,
use
,
(
^.
),
(
^..
),
(
^?
),
(
+~
),
(
%~
),
(
%=
),
sumOf
,
at
,
_Just
,
Each
(
..
),
itraverse_
,
both
,
mapped
,
forOf_
)
import
Control.Monad
(
guard
)
import
Control.Monad.Error.Class
(
MonadError
,
throwError
)
import
Control.Monad.Reader
...
...
@@ -534,11 +534,11 @@ instance Arbitrary NgramsTablePatch where
type
ReParent
a
=
forall
m
.
MonadState
NgramsTableMap
m
=>
a
->
m
()
reRootChildren
::
Maybe
NgramsTerm
->
ReParent
NgramsTerm
reRootChildren
::
NgramsTerm
->
ReParent
NgramsTerm
reRootChildren
root
ngram
=
do
nre
<-
use
$
at
ngram
forOf_
(
_Just
.
nre_children
.
folded
)
nre
$
\
child
->
do
at
child
.
_Just
.
nre_root
.
=
root
at
child
.
_Just
.
nre_root
?
=
root
reRootChildren
root
child
reParent
::
Maybe
RootParent
->
ReParent
NgramsTerm
...
...
@@ -546,7 +546,7 @@ reParent rp child = do
at
child
.
_Just
%=
(
(
nre_parent
.~
(
_rp_parent
<$>
rp
))
.
(
nre_root
.~
(
_rp_root
<$>
rp
))
)
reRootChildren
(
rp
^?
_Just
.
rp_root
)
child
reRootChildren
(
fromMaybe
child
(
rp
^?
_Just
.
rp_root
)
)
child
reParentAddRem
::
RootParent
->
NgramsTerm
->
ReParent
AddRem
reParentAddRem
rp
child
p
=
...
...
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