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
198
Issues
198
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
232db569
Unverified
Commit
232db569
authored
Mar 20, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[GrandDebat] change parsing function
parent
6492bff3
Pipeline
#289
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
GrandDebat.hs
src/Gargantext/Text/Parsers/GrandDebat.hs
+4
-3
No files found.
src/Gargantext/Text/Parsers/GrandDebat.hs
View file @
232db569
...
@@ -21,8 +21,8 @@ module Gargantext.Text.Parsers.GrandDebat
...
@@ -21,8 +21,8 @@ module Gargantext.Text.Parsers.GrandDebat
import
GHC.IO
(
FilePath
)
import
GHC.IO
(
FilePath
)
import
Data.Aeson
(
ToJSON
,
FromJSON
)
import
Data.Aeson
(
ToJSON
,
FromJSON
)
import
Data.JsonStream.Parser
(
eitherDecode
)
import
qualified
Data.JsonStream.Parser
as
P
import
Data.Either
(
either
)
--
import Data.Either (either)
import
Data.Maybe
(
Maybe
())
import
Data.Maybe
(
Maybe
())
import
Data.Text
(
Text
)
import
Data.Text
(
Text
)
import
qualified
Data.Text
as
Text
import
qualified
Data.Text
as
Text
...
@@ -98,4 +98,5 @@ class ReadFile a
...
@@ -98,4 +98,5 @@ class ReadFile a
instance
ReadFile
[
GrandDebatReference
]
instance
ReadFile
[
GrandDebatReference
]
where
where
--readFile fp = maybe [] identity <$> decode <$> DBL.readFile fp
--readFile fp = maybe [] identity <$> decode <$> DBL.readFile fp
readFile
fp
=
either
(
panic
.
Text
.
pack
)
identity
<$>
eitherDecode
<$>
DBL
.
readFile
fp
--readFile fp = either (panic . Text.pack) identity <$> P.eitherDecode <$> DBL.readFile fp
readFile
fp
=
P
.
parseLazyByteString
(
P
.
arrayOf
P
.
value
)
<$>
DBL
.
readFile
fp
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