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
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
Christian Merten
haskell-gargantext
Commits
f7f4c9cc
Unverified
Commit
f7f4c9cc
authored
Feb 18, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NGRAMS-REPO] Repl now uses repo.json too. No lock yet.
parent
7460d319
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Settings.hs
src/Gargantext/API/Settings.hs
+5
-5
No files found.
src/Gargantext/API/Settings.hs
View file @
f7f4c9cc
...
@@ -171,12 +171,12 @@ readRepo :: IO (MVar NgramsRepo)
...
@@ -171,12 +171,12 @@ readRepo :: IO (MVar NgramsRepo)
readRepo
=
do
readRepo
=
do
-- | Does file exist ? :: Bool
-- | Does file exist ? :: Bool
repoFile
<-
doesFileExist
repoSnapshot
repoFile
<-
doesFileExist
repoSnapshot
-- | Is file not empty ? :: Bool
-- | Is file not empty ? :: Bool
repoExists
<-
if
repoFile
repoExists
<-
if
repoFile
then
(
>
0
)
<$>
getFileSize
repoSnapshot
then
(
>
0
)
<$>
getFileSize
repoSnapshot
else
pure
repoFil
e
else
pure
Fals
e
newMVar
=<<
newMVar
=<<
if
repoExists
if
repoExists
then
do
then
do
...
@@ -186,7 +186,7 @@ readRepo = do
...
@@ -186,7 +186,7 @@ readRepo = do
copyFile
repoSnapshot
archive
copyFile
repoSnapshot
archive
pure
repo
pure
repo
else
else
pure
initMockRepo
pure
mempty
mkRepoSaver
::
MVar
NgramsRepo
->
IO
(
IO
()
)
mkRepoSaver
::
MVar
NgramsRepo
->
IO
(
IO
()
)
mkRepoSaver
repo_var
=
do
mkRepoSaver
repo_var
=
do
...
@@ -241,7 +241,7 @@ newDevEnvWith :: FilePath -> IO DevEnv
...
@@ -241,7 +241,7 @@ newDevEnvWith :: FilePath -> IO DevEnv
newDevEnvWith
file
=
do
newDevEnvWith
file
=
do
param
<-
databaseParameters
file
param
<-
databaseParameters
file
conn
<-
connect
param
conn
<-
connect
param
repo_var
<-
newMVar
initMock
Repo
repo_var
<-
read
Repo
repo_saver
<-
mkRepoSaver
repo_var
repo_saver
<-
mkRepoSaver
repo_var
pure
$
DevEnv
pure
$
DevEnv
{
_dev_env_conn
=
conn
{
_dev_env_conn
=
conn
...
...
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