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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
48e5a16c
Commit
48e5a16c
authored
Aug 25, 2025
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small cosmetic changes
parent
6cc5cf44
Pipeline
#7827
failed with stages
in 56 minutes and 29 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
NodeStory.hs
src/Gargantext/Core/NodeStory.hs
+8
-7
Types.hs
src/Gargantext/Core/NodeStory/Types.hs
+1
-3
No files found.
src/Gargantext/Core/NodeStory.hs
View file @
48e5a16c
...
@@ -40,8 +40,7 @@ TODO:
...
@@ -40,8 +40,7 @@ TODO:
- charger les listes
- charger les listes
-}
-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TupleSections #-}
...
@@ -131,11 +130,13 @@ buildForest mp = unfoldForestM unfoldNode $ Map.toList mp
...
@@ -131,11 +130,13 @@ buildForest mp = unfoldForestM unfoldNode $ Map.toList mp
let
initialChildren
=
getChildren
(
mSetToList
$
el
^.
ngramsElementChildren
)
let
initialChildren
=
getChildren
(
mSetToList
$
el
^.
ngramsElementChildren
)
go
initialChildren
*>
pure
(
mkTreeNode
(
n
,
el
))
go
initialChildren
*>
pure
(
mkTreeNode
(
n
,
el
))
where
where
go
::
[
TreeNode
e
]
-- This function is quite simple: the internal 'State' keeps track of the current
->
ExceptT
BuildForestError
(
State
(
Int
,
Set
VisitedNode
))
()
-- position of the visit, and if we discover a term we already seen before, we throw
-- an error, otherwise we store it in the state at the current position and carry on.
go
::
[
TreeNode
e
]
->
ExceptT
BuildForestError
(
State
(
Int
,
Set
VisitedNode
))
()
go
[]
=
pure
()
go
[]
=
pure
()
go
(
x
:
xs
)
=
do
go
(
x
:
xs
)
=
do
(
pos
,
visited
)
<-
get
(
!
pos
,
!
visited
)
<-
get
let
nt
=
fst
x
let
nt
=
fst
x
case
Set
.
member
(
VN
pos
nt
)
visited
of
case
Set
.
member
(
VN
pos
nt
)
visited
of
True
->
throwError
$
BFE_loop_detected
visited
True
->
throwError
$
BFE_loop_detected
visited
...
...
src/Gargantext/Core/NodeStory/Types.hs
View file @
48e5a16c
...
@@ -8,9 +8,7 @@ Stability : experimental
...
@@ -8,9 +8,7 @@ Stability : experimental
Portability : POSIX
Portability : POSIX
-}
-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE ViewPatterns #-}
...
...
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