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
145
Issues
145
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
9a63f1ad
Commit
9a63f1ad
authored
Jul 21, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] some instances and tools as todo
parent
b74cafc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
NodeStory.hs
src/Gargantext/Core/NodeStory.hs
+18
-2
No files found.
src/Gargantext/Core/NodeStory.hs
View file @
9a63f1ad
...
...
@@ -22,10 +22,20 @@ import Data.IntMap as Bibliotheque
import
qualified
Gargantext.Database.Query.Table.Ngrams
as
TableNgrams
import
Gargantext.Prelude
import
GHC.Generics
(
Generic
)
import
Data.Aeson
hiding
((
.=
))
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixUntagged
,
unPrefixSwagger
,
wellNamedSchema
)
-- TODO : repo Migration
repoMigration
::
(
s
->
s'
)
->
(
p
->
p'
)
->
Repo
s
p
->
NodeStory
s'
p'
repoMigration
=
undefined
-- Key is NodeId
-- | Node Story for each NodeType
type
NodeStory
s
p
=
Map
NodeId
(
Archive
s
p
)
data
NodeStory
s
p
=
NodeStory
{
unNodeStory
::
Map
NodeId
(
Archive
s
p
)
}
deriving
(
Generic
,
Show
)
instance
(
FromJSON
s
,
FromJSON
p
)
=>
FromJSON
(
NodeStory
s
p
)
data
Archive
s
p
=
Archive
{
_a_version
::
!
Version
...
...
@@ -37,7 +47,13 @@ data Archive s p = Archive
-- TODO Semigroup instance for unions
type
NodeListStory
=
NodeStory
NgramsState'
NgramsStatePatch'
type
NgramsState'
=
Map
TableNgrams
.
NgramsType
NgramsTableMap
type
NgramsStatePatch'
=
PatchMap
TableNgrams
.
NgramsType
NgramsTablePatch
instance
(
FromJSON
s
,
FromJSON
p
)
=>
FromJSON
(
Archive
s
p
)
where
parseJSON
=
genericParseJSON
$
unPrefix
"_a_"
instance
(
ToJSON
s
,
ToJSON
p
)
=>
ToJSON
(
Archive
s
p
)
where
toJSON
=
genericToJSON
$
unPrefix
"_a_"
toEncoding
=
genericToEncoding
$
unPrefix
"_a_"
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