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
191
Issues
191
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
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
Hide 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,11 +40,10 @@ TODO:
- charger les listes
-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TupleSections
#-}
module
Gargantext.Core.NodeStory
(
module
Gargantext
.
Core
.
NodeStory
.
Types
...
...
@@ -131,11 +130,13 @@ buildForest mp = unfoldForestM unfoldNode $ Map.toList mp
let
initialChildren
=
getChildren
(
mSetToList
$
el
^.
ngramsElementChildren
)
go
initialChildren
*>
pure
(
mkTreeNode
(
n
,
el
))
where
go
::
[
TreeNode
e
]
->
ExceptT
BuildForestError
(
State
(
Int
,
Set
VisitedNode
))
()
-- This function is quite simple: the internal 'State' keeps track of the current
-- 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
(
x
:
xs
)
=
do
(
pos
,
visited
)
<-
get
(
!
pos
,
!
visited
)
<-
get
let
nt
=
fst
x
case
Set
.
member
(
VN
pos
nt
)
visited
of
True
->
throwError
$
BFE_loop_detected
visited
...
...
src/Gargantext/Core/NodeStory/Types.hs
View file @
48e5a16c
...
...
@@ -8,11 +8,9 @@ Stability : experimental
Portability : POSIX
-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE ViewPatterns
#-}
module
Gargantext.Core.NodeStory.Types
(
HasNodeStory
...
...
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