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
ca9e6e9a
Commit
ca9e6e9a
authored
Apr 01, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[STYLE] Better use of Lenses.
parent
55bf4c4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Utils.hs
src/Gargantext/Prelude/Utils.hs
+2
-2
No files found.
src/Gargantext/Prelude/Utils.hs
View file @
ca9e6e9a
...
@@ -57,7 +57,7 @@ class ReadFile a where
...
@@ -57,7 +57,7 @@ class ReadFile a where
saveFile
::
(
MonadReader
env
m
,
MonadIO
m
,
HasSettings
env
,
SaveFile
a
)
saveFile
::
(
MonadReader
env
m
,
MonadIO
m
,
HasSettings
env
,
SaveFile
a
)
=>
a
->
m
FilePath
=>
a
->
m
FilePath
saveFile
a
=
do
saveFile
a
=
do
dataPath
<-
_fileFolder
.
(
view
settings
)
<$>
ask
dataPath
<-
view
(
settings
.
fileFolder
)
<$>
ask
(
fp
,
fn
)
<-
liftIO
$
(
toPath
3
)
.
hash
.
Text
.
pack
.
show
<$>
newStdGen
(
fp
,
fn
)
<-
liftIO
$
(
toPath
3
)
.
hash
.
Text
.
pack
.
show
<$>
newStdGen
let
foldPath
=
dataPath
<>
"/"
<>
fp
let
foldPath
=
dataPath
<>
"/"
<>
fp
...
@@ -72,5 +72,5 @@ saveFile a = do
...
@@ -72,5 +72,5 @@ saveFile a = do
readFile
::
(
MonadReader
env
m
,
MonadIO
m
,
HasSettings
env
,
ReadFile
a
)
readFile
::
(
MonadReader
env
m
,
MonadIO
m
,
HasSettings
env
,
ReadFile
a
)
=>
FilePath
->
m
a
=>
FilePath
->
m
a
readFile
fp
=
do
readFile
fp
=
do
dataPath
<-
_fileFolder
.
(
view
settings
)
<$>
ask
dataPath
<-
view
(
settings
.
fileFolder
)
<$>
ask
liftIO
$
readFile'
$
dataPath
<>
"/"
<>
fp
liftIO
$
readFile'
$
dataPath
<>
"/"
<>
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