Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
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
Przemyslaw Kaminski
haskell-gargantext
Commits
55e12934
Commit
55e12934
authored
Jan 22, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ngrams] add missing VersionedWithCount functions
parent
3a866fa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
Types.hs
src/Gargantext/API/Ngrams/Types.hs
+17
-0
No files found.
src/Gargantext/API/Ngrams/Types.hs
View file @
55e12934
...
...
@@ -649,7 +649,24 @@ instance (Typeable a, ToSchema a) => ToSchema (Versioned a) where
declareNamedSchema
=
wellNamedSchema
"_v_"
instance
Arbitrary
a
=>
Arbitrary
(
Versioned
a
)
where
arbitrary
=
Versioned
1
<$>
arbitrary
-- TODO 1 is constant so far
------------------------------------------------------------------------
type
Count
=
Int
data
VersionedWithCount
a
=
VersionedWithCount
{
_vc_version
::
Version
,
_vc_count
::
Count
,
_vc_data
::
a
}
deriving
(
Generic
,
Show
,
Eq
)
deriveJSON
(
unPrefix
"_vc_"
)
''
V
ersionedWithCount
makeLenses
''
V
ersionedWithCount
instance
(
Typeable
a
,
ToSchema
a
)
=>
ToSchema
(
VersionedWithCount
a
)
where
declareNamedSchema
=
wellNamedSchema
"_vc_"
instance
Arbitrary
a
=>
Arbitrary
(
VersionedWithCount
a
)
where
arbitrary
=
VersionedWithCount
1
1
<$>
arbitrary
-- TODO 1 is constant so far
toVersionedWithCount
::
Count
->
Versioned
a
->
VersionedWithCount
a
toVersionedWithCount
count
(
Versioned
version
data_
)
=
VersionedWithCount
version
count
data_
------------------------------------------------------------------------
data
Repo
s
p
=
Repo
{
_r_version
::
!
Version
...
...
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